mirror of
https://github.com/google/blockly.git
synced 2025-12-16 06:10:12 +01:00
Fix ui event checks (#4512)
This commit is contained in:
@@ -345,8 +345,8 @@ WorkspaceFactoryInit.addWorkspaceFactoryEventListeners_ = function(controller) {
|
||||
// Only enable "Edit Block" when a block is selected and it has a
|
||||
// surrounding parent, meaning it is nested in another block (blocks that
|
||||
// are not nested in parents cannot be shadow blocks).
|
||||
if (e.type == Blockly.Events.BLOCK_MOVE || (e.isUiEvent &&
|
||||
e.element == 'selected')) {
|
||||
if (e.type == Blockly.Events.BLOCK_MOVE ||
|
||||
e.type == Blockly.Event.SELECTED) {
|
||||
var selected = Blockly.selected;
|
||||
|
||||
// Show shadow button if a block is selected. Show "Add Shadow" if
|
||||
|
||||
Reference in New Issue
Block a user