Fixes pitch field not working with prompt (#4436)

This commit is contained in:
Beka Westberg
2020-11-09 10:50:21 -08:00
committed by GitHub
parent 345ad44f11
commit 76192da16e

View File

@@ -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));
};
/**