Fix bugs with missing mouseUp events on mutators. Also stop filtering out key presses.

This commit is contained in:
Rachel Fenichel
2016-08-25 15:18:53 -07:00
parent dc6ca79d4b
commit b77c080678
5 changed files with 39 additions and 6 deletions

View File

@@ -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