mirror of
https://github.com/google/blockly.git
synced 2026-01-09 10:00:09 +01:00
Merge pull request #841 from rachel-fenichel/bugfix/long_stop_bind_event
Use bindEvent_ instead of bindEventWithChecks_ for longStop
This commit is contained in:
@@ -339,9 +339,10 @@ Blockly.init_ = function(mainWorkspace) {
|
||||
Blockly.inject.bindDocumentEvents_ = function() {
|
||||
if (!Blockly.documentEventsBound_) {
|
||||
Blockly.bindEventWithChecks_(document, 'keydown', null, Blockly.onKeyDown_);
|
||||
Blockly.bindEventWithChecks_(document, 'touchend', null, Blockly.longStop_);
|
||||
Blockly.bindEventWithChecks_(document, 'touchcancel', null,
|
||||
Blockly.longStop_);
|
||||
// longStop needs to run to stop the context menu from showing up. It
|
||||
// should run regardless of what other touch event handlers have run.
|
||||
Blockly.bindEvent_(document, 'touchend', null, Blockly.longStop_);
|
||||
Blockly.bindEvent_(document, 'touchcancel', null, Blockly.longStop_);
|
||||
// Don't use bindEvent_ for document's mouseup since that would create a
|
||||
// corresponding touch handler that would squelch the ability to interact
|
||||
// with non-Blockly elements.
|
||||
|
||||
Reference in New Issue
Block a user