Fix emitting workspace event (#3959)

This commit is contained in:
alschmiedt
2020-06-11 11:30:54 -07:00
committed by GitHub
parent b2650e6cef
commit 6811010caf

View File

@@ -665,7 +665,7 @@ Blockly.Gesture.prototype.handleWsStart = function(e, ws) {
* @private
*/
Blockly.Gesture.prototype.fireWorkspaceClick_ = function(ws) {
var clickEvent = new Blockly.Events.Ui(null, "workspaceClick", null, null);
var clickEvent = new Blockly.Events.Ui(null, 'workspaceClick', null, null);
clickEvent.workspaceId = ws.id;
Blockly.Events.fire(clickEvent);
};
@@ -777,6 +777,7 @@ Blockly.Gesture.prototype.doWorkspaceClick_ = function(e) {
} else if (Blockly.selected) {
Blockly.selected.unselect();
}
this.fireWorkspaceClick_(ws);
};
/* End functions defining what actions to take to execute clicks on each type