mirror of
https://github.com/google/blockly.git
synced 2026-01-05 08:00:09 +01:00
Revert on blur for text input fields as it interferes with combo boxes (#3634)
This commit is contained in:
@@ -85,13 +85,6 @@ Blockly.FieldTextInput = function(opt_value, opt_validator, opt_config) {
|
||||
*/
|
||||
this.onKeyInputWrapper_ = null;
|
||||
|
||||
/**
|
||||
* Blur input event data.
|
||||
* @type {?Blockly.EventData}
|
||||
* @private
|
||||
*/
|
||||
this.onBlurInputWrapper_ = null;
|
||||
|
||||
/**
|
||||
* Whether the field should consider the whole parent block to be its click
|
||||
* target.
|
||||
@@ -432,9 +425,6 @@ Blockly.FieldTextInput.prototype.bindInputEvents_ = function(htmlInput) {
|
||||
this.onKeyInputWrapper_ =
|
||||
Blockly.bindEventWithChecks_(
|
||||
htmlInput, 'input', this, this.onHtmlInputChange_);
|
||||
this.onBlurInputWrapper_ =
|
||||
Blockly.bindEventWithChecks_(
|
||||
htmlInput, 'blur', this, this.onHtmlInputBlur_);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -450,10 +440,6 @@ Blockly.FieldTextInput.prototype.unbindInputEvents_ = function() {
|
||||
Blockly.unbindEvent_(this.onKeyInputWrapper_);
|
||||
this.onKeyInputWrapper_ = null;
|
||||
}
|
||||
if (this.onBlurInputWrapper_) {
|
||||
Blockly.unbindEvent_(this.onBlurInputWrapper_);
|
||||
this.onBlurInputWrapper_ = null;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -499,16 +485,6 @@ Blockly.FieldTextInput.prototype.onHtmlInputChange_ = function(_e) {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle blur for the editor.
|
||||
* @param {!Event} _e Focus event.
|
||||
* @protected
|
||||
*/
|
||||
Blockly.FieldTextInput.prototype.onHtmlInputBlur_ = function(_e) {
|
||||
Blockly.WidgetDiv.hide();
|
||||
Blockly.DropDownDiv.hideWithoutAnimation();
|
||||
};
|
||||
|
||||
/**
|
||||
* Set the html input value and the field's internal value. The difference
|
||||
* between this and ``setValue`` is that this also updates the html input
|
||||
|
||||
Reference in New Issue
Block a user