mirror of
https://github.com/google/blockly.git
synced 2026-01-09 01:50:11 +01:00
fix: use copyable interface for cut action, add tests (#8993)
* fix: use copyable for cut action * chore: rename keydown test * chore: add tests for shortcut items not acting on focused connections
This commit is contained in:
@@ -13,7 +13,6 @@ import {Gesture} from './gesture.js';
|
||||
import {ICopyData, isCopyable} from './interfaces/i_copyable.js';
|
||||
import {isDeletable} from './interfaces/i_deletable.js';
|
||||
import {isDraggable} from './interfaces/i_draggable.js';
|
||||
import {isSelectable} from './interfaces/i_selectable.js';
|
||||
import {KeyboardShortcut, ShortcutRegistry} from './shortcut_registry.js';
|
||||
import {Coordinate} from './utils/coordinate.js';
|
||||
import {KeyCodes} from './utils/keycodes.js';
|
||||
@@ -163,7 +162,7 @@ export function registerCut() {
|
||||
focused.isDeletable() &&
|
||||
isDraggable(focused) &&
|
||||
focused.isMovable() &&
|
||||
isSelectable(focused) &&
|
||||
isCopyable(focused) &&
|
||||
!focused.workspace.isFlyout
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user