Fixed fields still being editable on non-editable blocks.

This commit is contained in:
Beka Westberg
2019-06-10 10:42:58 -07:00
parent a18aa76e67
commit e0909b4ef8

View File

@@ -369,7 +369,8 @@ Blockly.Field.prototype.updateEditable = function() {
* @return {boolean} Whether this field is clickable.
*/
Blockly.Field.prototype.isClickable = function() {
return !!this.showEditor_ && (typeof this.showEditor_ === 'function');
return !!this.sourceBlock_ && this.sourceBlock_.isEditable() &&
!!this.showEditor_ && (typeof this.showEditor_ === 'function');
};
/**