mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 864891 - b2g/chrome/content/forms.js can dispatch a 'change' event on the wrong window in a single process build. r=fabrice
This commit is contained in:
parent
2c125a2973
commit
089b1a3446
@ -351,7 +351,7 @@ let FormAssistant = {
|
||||
case "Forms:Input:Value": {
|
||||
target.value = json.value;
|
||||
|
||||
let event = content.document.createEvent('HTMLEvents');
|
||||
let event = target.ownerDocument.createEvent('HTMLEvents');
|
||||
event.initEvent('input', true, false);
|
||||
target.dispatchEvent(event);
|
||||
break;
|
||||
@ -377,7 +377,7 @@ let FormAssistant = {
|
||||
|
||||
// only fire onchange event if any selected option is changed
|
||||
if (valueChanged) {
|
||||
let event = content.document.createEvent('HTMLEvents');
|
||||
let event = target.ownerDocument.createEvent('HTMLEvents');
|
||||
event.initEvent('change', true, true);
|
||||
target.dispatchEvent(event);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user