Description of problem: I want to switch positioning of one element to fixed once it gets out of the screen. I tried using onscroll event for this, but once the event got triggered. Firefox stops redrawing and the tab does not respond. When I tried calling the same function by onclick event, it works as expected. No error/warning messages in error console. Only onscroll event makes troubles. Changing position of that small element does not affect page size, so it should not affect anything scrolling related. It works in other web browsers. I was not able to prepare simplified reproducer that just moves the elements, so I've used alert() for reproducer. Version-Release number of selected component (if applicable): firefox-11.0-2.fc17.x86_64 How reproducible: always Steps to Reproduce: 1.try to show alert message in onscroll event for example open http://mihlit.cz/smetiste/test.html and scroll 2. 3. Actual results: firefox not redrawing, current tab not responding (you can close the tab with ctrl-w) Expected results: firefox shows alert message Additional info: This works in Konqueror(KHTML), Aurora(webkit), Opera. Other browsers were not tested. Original code making troubles (it does not trigger the issue when used standalone without other code): function $(v) { if (typeof(e)=='string') return document.getElementById(v); return v;} function getElPos(e) { if (typeof(e)=='string') e=$(e); var posX=0, posY=0; while(e!=null){ posX+=e.offsetLeft; posY+=e.offsetTop; e=e.offsetParent; } return [posX,posY]; } window.onscroll=function() { if (!STOP) { // make sure ff is not stuck because there are too many events STOP=true; var e=mainw.childs.leftcol.childs.navigation_outter; e.geometry=function() { e.elem.style.position='fixed'; e.elem.style.left=getElPos(e.par.elem)[0]+'px'; e.elem.style.top='0px'; e.elem.style.width=parseInt($('lcstatus_outter').offsetWidth)+'px'; } e.geometry(); } }
Looks like nice upstream bug. I've filled it here: https://bugzilla.mozilla.org/show_bug.cgi?id=748675 Thanks.