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:
Vivien Nicolas 2013-04-26 12:17:25 +02:00
parent 2c125a2973
commit 089b1a3446

View File

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