mirror of
https://github.com/google/blockly.git
synced 2026-01-07 09:00:11 +01:00
Fix bugs with missing mouseUp events on mutators. Also stop filtering out key presses.
This commit is contained in:
@@ -156,6 +156,18 @@ Blockly.resizeSvgContents = function(workspace) {
|
||||
workspace.resizeContents();
|
||||
};
|
||||
|
||||
/**
|
||||
* Decide whether Blockly should handle or ignore this event.
|
||||
* Mouse and touch events require special checks because we only want to deal
|
||||
* with one touch stream at a time. All other events should always be handled.
|
||||
* @param {!Event} e The event to check.
|
||||
* @return {boolean} True if this event should be passed through to the
|
||||
* registered handler; false if it should be blocked.
|
||||
*/
|
||||
Blockly.shouldHandleEvent = function(e) {
|
||||
return !Blockly.isMouseOrTouchEvent(e) || Blockly.checkTouchIdentifier(e);
|
||||
};
|
||||
|
||||
/**
|
||||
* Check whether the touch identifier on the event matches the current saved
|
||||
* identifier. If there is no identifier, that means it's a mouse event and
|
||||
|
||||
Reference in New Issue
Block a user