mirror of
https://github.com/google/blockly.git
synced 2026-01-14 12:27:10 +01:00
Merge pull request #608 from lizlooney/confirm
Check result of window.confirm before deleting variables.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user