зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1456530 - Stop dispatching the select event on the tabs element. r=mconley
MozReview-Commit-ID: B4Ash6lC64u --HG-- extra : rebase_source : a40cde1b42c9c6fb0c76e021556e8458176dfc32
This commit is contained in:
Родитель
b40ddc17c4
Коммит
140aac0617
|
@ -1,25 +0,0 @@
|
|||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="boom();" class="reftest-wait">
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||
|
||||
function boom()
|
||||
{
|
||||
var A = document.getElementById("A");
|
||||
var B = document.createElementNS(XUL_NS, "tabs");
|
||||
var C = document.createElementNS(XUL_NS, "hbox");
|
||||
B.appendChild(C);
|
||||
A.appendChild(B);
|
||||
}
|
||||
|
||||
function remove(n)
|
||||
{
|
||||
n.parentNode.removeChild(n);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<hbox id="A" onselect="remove(event.originalTarget); document.documentElement.removeAttribute('class');"></hbox>
|
||||
|
||||
</window>
|
|
@ -32,7 +32,6 @@ load 345837-1.xhtml
|
|||
load 346381-1.html
|
||||
load 348049-1.xhtml
|
||||
load 349355-1.html
|
||||
load 354645-1.xul
|
||||
load 359432-1.xhtml
|
||||
load 360599-1.html
|
||||
load 366200-1.xhtml
|
||||
|
|
|
@ -368,8 +368,6 @@
|
|||
<![CDATA[
|
||||
var tab = this.getItemAtIndex(val);
|
||||
if (tab) {
|
||||
var alreadySelected = tab.selected;
|
||||
|
||||
Array.forEach(this.childNodes, function(aTab) {
|
||||
if (aTab.selected && aTab != tab)
|
||||
aTab._selected = false;
|
||||
|
@ -386,13 +384,6 @@
|
|||
// element.
|
||||
this.tabbox.tabpanels.selectedPanel = linkedPanel;
|
||||
}
|
||||
|
||||
if (!alreadySelected) {
|
||||
// Fire an onselect event for the tabs element.
|
||||
var event = document.createEvent("Events");
|
||||
event.initEvent("select", true, true);
|
||||
this.dispatchEvent(event);
|
||||
}
|
||||
}
|
||||
return val;
|
||||
]]>
|
||||
|
|
Загрузка…
Ссылка в новой задаче