Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
"predeploy": "blockly-scripts predeploy",
"prepublishOnly": "npm login --registry https://wombat-dressing-room.appspot.com",
"start": "blockly-scripts start",
"test": "npm run wdio:clean && npm run wdio:build && npm run wdio:run",
"test": "npm run test:mocha && npm run test:wdio",
"test:mocha": "blockly-scripts test",
"test:wdio": "npm run wdio:clean && npm run wdio:run",
"wdio:build": "npm run wdio:build:app && npm run wdio:build:tests",
"wdio:build:app": "cd test/webdriverio && webpack",
"wdio:build:tests": "tsc -p ./test/webdriverio/test/tsconfig.json",
Expand Down Expand Up @@ -65,6 +67,7 @@
"eslint-plugin-jsdoc": "^46.8.2",
"globals": "^15.4.0",
"html-webpack-plugin": "^5.6.0",
"jsdom-global": "^3.0.2",
"mocha": "^11.1.0",
"p5": "^1.10.0",
"prettier": "^3.3.1",
Expand Down
16 changes: 13 additions & 3 deletions src/actions/clipboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ export class Clipboard {

/**
* Uninstall this action as both a keyboard shortcut and a context menu item.
* N. B. This does *not* currently reinstall the original keyboard shortcuts.
* You should manually reinstall the previously registered shortcuts (either
* from core or from another plugin you may be using).
* Reinstall the original cut/copy/paste shortcuts.
*/
uninstall() {
ContextMenuRegistry.registry.unregister('blockCutFromContextMenu');
Expand All @@ -72,6 +70,18 @@ export class Clipboard {
ShortcutRegistry.registry.unregister(Constants.SHORTCUT_NAMES.CUT);
ShortcutRegistry.registry.unregister(Constants.SHORTCUT_NAMES.COPY);
ShortcutRegistry.registry.unregister(Constants.SHORTCUT_NAMES.PASTE);

if (this.oldCutShortcut) {
ShortcutRegistry.registry.register(this.oldCutShortcut);
}

if (this.oldCopyShortcut) {
ShortcutRegistry.registry.register(this.oldCopyShortcut);
}

if (this.oldPasteShortcut) {
ShortcutRegistry.registry.register(this.oldPasteShortcut);
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/actions/edit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import {ContextMenuRegistry, Msg, keyboardNavigationController} from 'blockly';
import {Navigation} from 'src/navigation';
import {Navigation} from '../navigation';
import {getMenuItem} from '../shortcut_formatting';
import * as Constants from '../constants';

Expand Down
2 changes: 2 additions & 0 deletions src/actions/enter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export class EnterAction {
}
},
keyCodes: [KeyCodes.ENTER, KeyCodes.SPACE],
allowCollision: true,
});
}

Expand All @@ -116,6 +117,7 @@ export class EnterAction {
*/
private shouldHandleEnterForWS(workspace: WorkspaceSvg): boolean {
if (!this.navigation.canCurrentlyNavigate(workspace)) return false;
if (workspace.isDragging()) return false;

const curNode = workspace.getCursor().getCurNode();
if (!curNode) return false;
Expand Down
Loading
Loading