Skip to content
Browse files

At some point recently Gecko started including whitespace nodes in th…

…e <content/> section in the anonymous content model, so using childNodes[n] isn't reliable. Changed to use getElementsByTagName instead.
  • Loading branch information...
1 parent f67e76c commit 8426488f8a48d0a3bfd200747b8e341571e387a8 Jason Johnston committed Oct 20, 2004
Showing with 6 additions and 6 deletions.
  1. +6 −6 FisheyeMenu.xml
View
12 FisheyeMenu.xml
@@ -136,7 +136,7 @@
<field name="_showPopup">true</field>
<property name="showPopup" onget="return this._showPopup;">
<setter><![CDATA[
- var popup = document.getAnonymousNodes(this)[0].childNodes[2];
+ var popup = document.getAnonymousNodes(this)[0].getElementsByTagName("div")[0];
if(val) {
popup.style.display="block";
var thisRef = this;
@@ -207,21 +207,21 @@
case "bottom": iL=varPos; iB=fixPos; pB=popPos; break;
default: iT=varPos; iL=fixPos; pL=popPos; pT=bar.iconMaxSize/3; break;
}
- var anon = document.getAnonymousNodes(this)[0]
+ var anon = document.getAnonymousNodes(this)[0];
s = anon.style;
s.left=iL||"auto"; s.top=iT||"auto"; s.right=iR||"auto"; s.bottom=iB||"auto";
s.height=s.width=(this.size=newSize)+"px";
- s = anon.childNodes[2].style;
+ s = anon.getElementsByTagName("div")[0].style;
s.left=pL||"auto"; s.top=pT||"auto"; s.right=pR||"auto"; s.bottom=pB||"auto";
]]></body>
</method>
<constructor><![CDATA[
var icon = document.getAnonymousNodes(this)[0];
- var iconImg = icon.childNodes[0];
- var iconAlt = icon.childNodes[1];
- var iconLbl = icon.childNodes[2];
+ var iconImg = icon.getElementsByTagName("img")[0];
+ var iconAlt = icon.getElementsByTagName("span")[0];
+ var iconLbl = icon.getElementsByTagName("div")[0];
iconAlt.appendChild(document.createTextNode(this.label));

0 comments on commit 8426488

Please sign in to comment.
Something went wrong with that request. Please try again.