From gary.stainburn at ringways.co.uk Fri Jun 5 22:01:34 2015 Content-Type: multipart/mixed; boundary="===============4172856310890971256==" MIME-Version: 1.0 From: Gary Stainburn To: users at lists.fedoraproject.org Subject: Firefox absolute positioning stopped working Date: Mon, 11 Nov 2013 15:43:05 +0000 Message-ID: <201311111543.05304.gary.stainburn@ringways.co.uk> --===============4172856310890971256== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi folks, Sorry if this is O.T. but I only seem to be having the problem on my Fedora = workstations. I use popup div's in my web pages - div's that are initally display:none bu= t = then on an event have their absolute size and position changed. This method worked fine until recently (not sure how recent, but it's been = broken for a couple of weeks at least). It still works in I.E., Chrome and = Firefox on Win7 PC's. However, on my Fedora workstations, the div is no longer appearing in the = right place (top left corner appearing where mouse pointer is). It now = appears on the very left corner of the window. The only thing I can think of is that my Fedora boxes are regularly updated = while my Windows PC's only get software updates occassionally. This would = point to the problem being a recent firefox update. Can anyone help as Google is only showing me old items. Gary HTML
............. JAVASCRIPT (called from onMouseOver function vistaTableMouseOver(e) { if (!e) return; var t=3De; if (!t.id) { // event mode if (e && ((t =3D e.target) || (t =3D e.srcElement))) { while (! t.id && t.parentNode && t.nodeName !=3D 'TR') t=3Dt.parentNode; } } if (!t.id) = return; var windowLowerX=3Dwindow.innerWidth; var windowLowerY=3Dwindow.innerHeight; if (e.clientX) { // store target X/Y var vistaDivX=3De.clientX; // location of mouse click var vistaDivY=3De.clientY; } else { var vistaDivX=3DfindX(t); // location of TD var vistaDivY=3DfindY(t); } var vistaKey=3Dt.id; var hp =3D document.getElementById("hoverpopup"); hp.style.width=3D'200px'; hp.innerHTML=3D'Please wait....'; var xOffset=3DvistaDivX+20; var yOffset=3DvistaDivY+10; var divLowerX=3DvistaDivX+200; var divLowerY=3DvistaDivY+hp.clientHeight; // ensure the div is visible, i.e. not off the right / bottom if (divLowerY > windowLowerY) { yOffset=3Dwindow.innerHeight-(hp.clientHeight+10); } if (divLowerX > windowLowerX) { xOffset=3Dwindow.innerWidth-(hp.clientWidth+10); } } -- = Gary Stainburn Group I.T. Manager Ringways Garages http://www.ringways.co.uk=20 --===============4172856310890971256==-- From gary.stainburn at ringways.co.uk Fri Jun 5 22:01:34 2015 Content-Type: multipart/mixed; boundary="===============6084328395795925016==" MIME-Version: 1.0 From: Gary Stainburn To: users at lists.fedoraproject.org Subject: Re: Firefox absolute positioning stopped working Date: Mon, 11 Nov 2013 16:29:50 +0000 Message-ID: <201311111629.50268.gary.stainburn@ringways.co.uk> In-Reply-To: 201311111543.05304.gary.stainburn@ringways.co.uk --===============6084328395795925016== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Firstly, appologies for missing out the relevent bit of code, i.e. the bit = that was wrong. Secondly, I've managed to find the solution. The original code was: hp.style.top =3D yOffset; hp.style.left =3D xOffset; The new code is: hp.style.top =3D yOffset+'px'; hp.style.left =3D xOffset+'px'; Although the old original code worked everywhere else, the new code also wo= rks = with new versions of Firefox. Gary --===============6084328395795925016==--