Add UI events.

This commit is contained in:
Neil Fraser
2016-03-28 15:40:37 -07:00
parent b4218217c2
commit db7a787778
5 changed files with 69 additions and 0 deletions

View File

@@ -164,6 +164,8 @@ Blockly.Comment.prototype.setVisible = function(visible) {
// No change.
return;
}
Blockly.Events.fire(
new Blockly.Events.Ui(this.block_, 'commentOpen', !visible, visible));
if ((!this.block_.isEditable() && !this.textarea_) || goog.userAgent.IE) {
// Steal the code from warnings to make an uneditable text bubble.
// MSIE does not support foreignobject; textareas are impossible.