简体   繁体   中英

Firefox 5 DOM bug on windows 7 (and not XP)?

I have a table which consists of two divs, an upper and a lower. The lower div is scrollable and as you scroll, the upper div keeps up with this (so you can see the columns). On windows XP, FF 5 it works fine, but on FF 5, Win 7 when I scroll across sometimes the data in the lower div appears within the top div (containing the column headers).

It usually happens after i drag the scrollbar all the way to the left or right extreme. Also, after a few seconds the top div changes back to the column headers (what it should have been all along).

This is my javascript for the scrolling:

function Scroll(SourceID, TargetID, DoIfMoz){
    if(DoIfMoz || navigator.userAgent.indexOf("Firefox") == -1) document.getElementById(TargetID).scrollLeft = document.getElementById(SourceID).scrollLeft;
}

where SourceID is the lower div and TargetID is the upper div, which is being moved.

Does anyone know what's happening?

There is nothing in the code that you posted that would be changing the content of any element on the screen. As you say it does change back to what it is meant to be after a few seconds I would be more thinking this is a glitch in the way the browser is rending the overall page. Have you tryed setting up a stop for the scroll left/right, so for example if the max scroll we can do left is 100px have it stop scrolling on 99px (you did say it kicks in when you drag the scroll bar all the way to the left/right

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM