mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
Make widgets events bubble again as per expectations b=330190 r=bryner
This commit is contained in:
parent
69d87c56fa
commit
e19f6a698e
@ -41,7 +41,7 @@
|
||||
this.removeAttribute('checked');
|
||||
if (change) {
|
||||
var event = document.createEvent('Events');
|
||||
event.initEvent('CheckboxStateChange', false, true);
|
||||
event.initEvent('CheckboxStateChange', true, true);
|
||||
this.dispatchEvent(event);
|
||||
}
|
||||
return aValue;
|
||||
|
@ -314,7 +314,7 @@
|
||||
aCell.setAttribute("hover", "true");
|
||||
this.mHoverCell = aCell;
|
||||
var event = document.createEvent('Events');
|
||||
event.initEvent('DOMMenuItemActive', false, true);
|
||||
event.initEvent('DOMMenuItemActive', true, true);
|
||||
aCell.dispatchEvent(event);
|
||||
}
|
||||
]]></body>
|
||||
|
@ -355,7 +355,7 @@
|
||||
<body>
|
||||
<![CDATA[
|
||||
var event = document.createEvent("Events");
|
||||
event.initEvent("dialog"+aDlgType, false, true);
|
||||
event.initEvent("dialog"+aDlgType, true, true);
|
||||
|
||||
// handle dom event handlers
|
||||
var noCancel = this.dispatchEvent(event);
|
||||
|
@ -59,7 +59,7 @@
|
||||
break;
|
||||
case "clear-button":
|
||||
var event = document.createEvent("Events");
|
||||
event.initEvent("clear", false, true);
|
||||
event.initEvent("clear", true, true);
|
||||
this.dispatchEvent(event);
|
||||
break;
|
||||
}
|
||||
@ -79,4 +79,4 @@
|
||||
|
||||
</bindings>
|
||||
|
||||
|
||||
|
||||
|
@ -327,7 +327,7 @@
|
||||
return val;
|
||||
this.setAttribute("selectedIndex", val);
|
||||
var event = document.createEvent('Events');
|
||||
event.initEvent('select', false, true);
|
||||
event.initEvent('select', true, true);
|
||||
this.dispatchEvent(event);
|
||||
return val;
|
||||
]]>
|
||||
|
@ -99,7 +99,7 @@
|
||||
<![CDATA[
|
||||
if (!this._suppressOnSelect && this.getAttribute("suppressonselect") != "true") {
|
||||
var event = document.createEvent("Events");
|
||||
event.initEvent("select", false, true);
|
||||
event.initEvent("select", true, true);
|
||||
this.dispatchEvent(event);
|
||||
}
|
||||
]]>
|
||||
@ -826,7 +826,7 @@
|
||||
else
|
||||
this.removeAttribute('checked');
|
||||
var event = document.createEvent('Events');
|
||||
event.initEvent('CheckboxStateChange', false, true);
|
||||
event.initEvent('CheckboxStateChange', true, true);
|
||||
this.dispatchEvent(event);
|
||||
return val;
|
||||
]]></setter>
|
||||
|
@ -48,7 +48,7 @@
|
||||
// Value changed, synthesize an event
|
||||
try {
|
||||
var event = document.createEvent("Events");
|
||||
event.initEvent("change", false, true);
|
||||
event.initEvent("change", true, true);
|
||||
aPreference.dispatchEvent(event);
|
||||
}
|
||||
catch (e) {
|
||||
@ -352,7 +352,7 @@
|
||||
// Value changed, synthesize an event
|
||||
try {
|
||||
var event = document.createEvent("Events");
|
||||
event.initEvent("syncfrompreference", false, true);
|
||||
event.initEvent("syncfrompreference", true, true);
|
||||
var f = new Function ("event",
|
||||
aElement.getAttribute("onsyncfrompreference"));
|
||||
rv = f(event);
|
||||
@ -401,7 +401,7 @@
|
||||
// Value changed, synthesize an event
|
||||
try {
|
||||
var event = document.createEvent("Events");
|
||||
event.initEvent("synctopreference", false, true);
|
||||
event.initEvent("synctopreference", true, true);
|
||||
var f = new Function ("event",
|
||||
aElement.getAttribute("onsynctopreference"));
|
||||
var rv = f(event);
|
||||
@ -680,7 +680,7 @@
|
||||
// Panel loaded, synthesize a load event.
|
||||
try {
|
||||
var event = document.createEvent("Events");
|
||||
event.initEvent(aEventName, false, true);
|
||||
event.initEvent(aEventName, true, true);
|
||||
var cancel = !aTarget.dispatchEvent(event);
|
||||
if (aTarget.hasAttribute("on" + aEventName)) {
|
||||
var fn = new Function ("event", aTarget.getAttribute("on" + aEventName));
|
||||
|
@ -279,13 +279,6 @@
|
||||
</implementation>
|
||||
|
||||
<handlers>
|
||||
<handler event="select">
|
||||
<![CDATA[
|
||||
//XXXblake this should not be necessary
|
||||
// initEvent was supposed to prevent this from bubbling
|
||||
event.preventBubble();
|
||||
]]>
|
||||
</handler>
|
||||
<handler event="mousedown">
|
||||
if (this.disabled)
|
||||
event.preventDefault();
|
||||
|
@ -428,7 +428,7 @@
|
||||
|
||||
if (!this.suppressOnSelect) {
|
||||
var event = document.createEvent("Events");
|
||||
event.initEvent("select", false, true);
|
||||
event.initEvent("select", true, true);
|
||||
this.dispatchEvent(event);
|
||||
|
||||
// if we have controllers, notify the command dispatcher
|
||||
|
@ -295,7 +295,7 @@
|
||||
|
||||
// Fire an onselect event for the tabs element.
|
||||
var event = document.createEvent('Events');
|
||||
event.initEvent('select', false, true);
|
||||
event.initEvent('select', true, true);
|
||||
this.dispatchEvent(event);
|
||||
}
|
||||
return val;
|
||||
@ -496,7 +496,7 @@
|
||||
this.setAttribute("selectedIndex", val);
|
||||
if (this._selectedPanel != panel) {
|
||||
var event = document.createEvent("Events");
|
||||
event.initEvent("select", false, true);
|
||||
event.initEvent("select", true, true);
|
||||
this.dispatchEvent(event);
|
||||
}
|
||||
return val;
|
||||
|
@ -59,7 +59,8 @@
|
||||
|
||||
<content>
|
||||
<xul:stringbundle src="chrome://global/locale/tabbrowser.properties"/>
|
||||
<xul:tabbox flex="1" eventnode="document" xbl:inherits="handleCtrlPageUpDown">
|
||||
<xul:tabbox flex="1" eventnode="document" xbl:inherits="handleCtrlPageUpDown"
|
||||
onselect="if (!('updateCurrentBrowser' in this.parentNode) || event.target.localName != 'tabpanels') return; this.parentNode.updateCurrentBrowser();">
|
||||
<xul:hbox class="tab-drop-indicator-bar">
|
||||
<xul:hbox class="tab-drop-indicator"/>
|
||||
</xul:hbox>
|
||||
@ -106,10 +107,7 @@
|
||||
class="tabbrowser-tab" label="&untitledTab;" crop="end"/>
|
||||
</xul:tabs>
|
||||
</xul:hbox>
|
||||
<xul:tabpanels flex="1" class="plain" selectedIndex="0"
|
||||
onselect="if (!('updateCurrentBrowser' in this.parentNode.parentNode) ||
|
||||
event.target != this) return;
|
||||
this.parentNode.parentNode.updateCurrentBrowser();">
|
||||
<xul:tabpanels flex="1" class="plain" selectedIndex="0">
|
||||
<xul:vbox flex="1">
|
||||
<xul:browsermessage hidden="true" type="top"/>
|
||||
<xul:browser flex="1" type="content-primary" message="true" disablehistory="true" xbl:inherits="tooltip=contenttooltip,contextmenu=contentcontextmenu,autocompletepopup"/>
|
||||
@ -1427,7 +1425,7 @@
|
||||
// Only capture clicks on tabbox.xml's <spacer>
|
||||
aEvent.originalTarget.localName == "spacer") {
|
||||
var e = document.createEvent("Events");
|
||||
e.initEvent("NewTab", false, true);
|
||||
e.initEvent("NewTab", true, true);
|
||||
this.dispatchEvent(e);
|
||||
}
|
||||
]]>
|
||||
|
@ -240,7 +240,7 @@
|
||||
// Only fire event when current row is expanded or collapsed
|
||||
// because that's all the assistive technology really cares about.
|
||||
var event = document.createEvent('Events');
|
||||
event.initEvent('OpenStateChange', false, true);
|
||||
event.initEvent('OpenStateChange', true, true);
|
||||
this.dispatchEvent(event);
|
||||
}
|
||||
return true;
|
||||
|
@ -414,7 +414,7 @@
|
||||
<body>
|
||||
<![CDATA[
|
||||
var event = document.createEvent("Events");
|
||||
event.initEvent(aType, false, true);
|
||||
event.initEvent(aType, true, true);
|
||||
|
||||
// handle dom event handlers
|
||||
var noCancel = aTarget.dispatchEvent(event);
|
||||
|
Loading…
Reference in New Issue
Block a user