mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 860546 - Ignore content changes caused by key events. r=fabrice
This commit is contained in:
parent
440c264cce
commit
f7869463f2
@ -188,6 +188,7 @@ let FormAssistant = {
|
||||
addEventListener("beforeunload", this, true, false);
|
||||
addEventListener("input", this, true, false);
|
||||
addEventListener("keydown", this, true, false);
|
||||
addEventListener("keyup", this, true, false);
|
||||
addMessageListener("Forms:Select:Choice", this);
|
||||
addMessageListener("Forms:Input:Value", this);
|
||||
addMessageListener("Forms:Select:Blur", this);
|
||||
@ -261,6 +262,7 @@ let FormAssistant = {
|
||||
// current input field has changed.
|
||||
EditAction: function fa_editAction() {
|
||||
if (this._editing) {
|
||||
this._editing = false;
|
||||
return;
|
||||
}
|
||||
this.sendKeyboardState(this.focusedElement);
|
||||
@ -359,12 +361,15 @@ let FormAssistant = {
|
||||
this._editing = true;
|
||||
|
||||
// We use 'setTimeout' to wait until the input element accomplishes the
|
||||
// change in selection range or text content.
|
||||
// change in selection range.
|
||||
content.setTimeout(function() {
|
||||
this.updateSelection();
|
||||
this._editing = false;
|
||||
}.bind(this), 0);
|
||||
break;
|
||||
|
||||
case "keyup":
|
||||
this._editing = false;
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user