Merge pull request #608 from lizlooney/confirm

Check result of window.confirm before deleting variables.
This commit is contained in:
rachel-fenichel
2016-08-29 10:28:30 -07:00
committed by GitHub

View File

@@ -322,9 +322,12 @@ Blockly.Workspace.prototype.deleteVariable = function(name) {
return;
}
}
window.confirm(
var ok = window.confirm(
Blockly.Msg.DELETE_VARIABLE_CONFIRMATION.replace('%1', uses.length).
replace('%2', name));
if (!ok) {
return;
}
}
Blockly.Events.setGroup(true);