mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 882866 - Ignore all EditAction notifications caused by replaceSurroundingText. r=dflanagan
This commit is contained in:
parent
7f542efd72
commit
19ef469157
@ -208,6 +208,7 @@ let FormAssistant = {
|
||||
_documentEncoder: null,
|
||||
_editor: null,
|
||||
_editing: false,
|
||||
_ignoreEditActionOnce: false,
|
||||
|
||||
get focusedElement() {
|
||||
if (this._focusedElement && Cu.isDeadWrapper(this._focusedElement))
|
||||
@ -268,7 +269,9 @@ let FormAssistant = {
|
||||
// current input field has changed.
|
||||
EditAction: function fa_editAction() {
|
||||
if (this._editing) {
|
||||
this._editing = false;
|
||||
return;
|
||||
} else if (this._ignoreEditActionOnce) {
|
||||
this._ignoreEditActionOnce = false;
|
||||
return;
|
||||
}
|
||||
this.sendKeyboardState(this.focusedElement);
|
||||
@ -364,7 +367,7 @@ let FormAssistant = {
|
||||
|
||||
case "keydown":
|
||||
// Don't monitor the text change resulting from key event.
|
||||
this._editing = true;
|
||||
this._ignoreEditActionOnce = true;
|
||||
|
||||
// We use 'setTimeout' to wait until the input element accomplishes the
|
||||
// change in selection range.
|
||||
@ -374,7 +377,7 @@ let FormAssistant = {
|
||||
break;
|
||||
|
||||
case "keyup":
|
||||
this._editing = false;
|
||||
this._ignoreEditActionOnce = false;
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user