From 76192da16e1abe3ea3a57827630fb63d8e54cb04 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Mon, 9 Nov 2020 10:50:21 -0800 Subject: [PATCH] Fixes pitch field not working with prompt (#4436) --- core/field_textinput.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/field_textinput.js b/core/field_textinput.js index ea3081ad6..9a5d1d574 100644 --- a/core/field_textinput.js +++ b/core/field_textinput.js @@ -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)); }; /**