Don't fire 'click' events when opening bubbles. Fix groups on context menu deletes.

This commit is contained in:
Neil Fraser 2016-04-07 17:07:02 -07:00
parent c3931df2ae
commit d269f70f95
2 changed files with 9 additions and 2 deletions

View file

@ -145,6 +145,15 @@ Blockly.Events.filter = function(queueIn, forward) {
event1.newValue = event2.newValue;
queue.splice(j, 1);
j--;
} else if (event1.type == Blockly.Events.UI &&
event2.element == 'click' &&
(event1.element == 'commentOpen' ||
event1.element == 'mutatorOpen' ||
event1.element == 'warningOpen')) {
// Merge change events.
event1.newValue = event2.newValue;
queue.splice(j, 1);
j--;
}
}
}

View file

@ -82,7 +82,6 @@ Blockly.WidgetDiv.show = function(newOwner, rtl, dispose) {
Blockly.WidgetDiv.DIV.style.top = xy.y + 'px';
Blockly.WidgetDiv.DIV.style.direction = rtl ? 'rtl' : 'ltr';
Blockly.WidgetDiv.DIV.style.display = 'block';
Blockly.Events.setGroup(true);
};
/**
@ -98,7 +97,6 @@ Blockly.WidgetDiv.hide = function() {
Blockly.WidgetDiv.dispose_ && Blockly.WidgetDiv.dispose_();
Blockly.WidgetDiv.dispose_ = null;
goog.dom.removeChildren(Blockly.WidgetDiv.DIV);
Blockly.Events.setGroup(false);
}
};