Skip to content

Commit

Permalink
Fixes pitch field not working with prompt (#4436)
Browse files Browse the repository at this point in the history
  • Loading branch information
BeksOmega authored Nov 9, 2020
1 parent 345ad44 commit 76192da
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions core/field_textinput.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,10 @@ Blockly.FieldTextInput.prototype.showEditor_ = function(_opt_e,
* @private
*/
Blockly.FieldTextInput.prototype.showPromptEditor_ = function() {
var fieldText = this;
Blockly.prompt(Blockly.Msg['CHANGE_VALUE_TITLE'], this.getText(),
function(newValue) {
fieldText.setValue(newValue);
});
function(text) {
this.setValue(this.getValueFromEditorText_(text));
}.bind(this));
};

/**
Expand Down

0 comments on commit 76192da

Please sign in to comment.