diff --git a/blocks/variables.js b/blocks/variables.js index d82a98bed..07ae8e6e5 100644 --- a/blocks/variables.js +++ b/blocks/variables.js @@ -111,7 +111,7 @@ Blockly.Constants.Variables.CUSTOM_CONTEXT_MENU_VARIABLE_GETTER_SETTER_MIXIN = { var contextMenuMsg = Blockly.Msg.VARIABLES_SET_CREATE_GET; } - var option = {enabled: true}; + var option = {enabled: this.workspace.remainingCapacity() > 0}; var name = this.getFieldValue('VAR'); option.text = contextMenuMsg.replace('%1', name); var xmlField = goog.dom.createDom('field', null, name);