Don’t drop newValue from bubble open events.

This commit is contained in:
Neil Fraser
2019-04-01 09:53:59 -07:00
committed by Neil Fraser
parent f118d33855
commit 767495cf76
2 changed files with 3 additions and 4 deletions

View File

@@ -249,12 +249,11 @@ Blockly.Events.filter = function(queueIn, forward) {
(lastEvent.element == 'commentOpen' ||
lastEvent.element == 'mutatorOpen' ||
lastEvent.element == 'warningOpen')) {
// Merge click events.
lastEvent.newValue = event.newValue;
// Drop click events caused by opening/closing bubbles.
} else {
// Collision: newer events should merge into this event to maintain
// order.
hash[key] = { event: event, index: 1};
hash[key] = {event: event, index: 1};
mergedQueue.push(event);
}
}

View File

@@ -37,7 +37,7 @@ goog.require('Blockly.Events.Abstract');
* categories).
* UI events do not undo or redo.
* @param {Blockly.Block} block The affected block.
* @param {string} element One of 'selected', 'comment', 'mutator', etc.
* @param {string} element One of 'selected', 'comment', 'mutatorOpen', etc.
* @param {*} oldValue Previous value of element.
* @param {*} newValue New value of element.
* @extends {Blockly.Events.Abstract}