If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

rectangle calculation after scrolling (an element, not the window)

UNCONFIRMED
Unassigned

Status

()

Firefox
General
UNCONFIRMED
6 years ago
6 years ago

People

(Reporter: Patrick SERRU, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

6 years ago
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Build Identifier: Mozilla/5.0 (X11; Linux x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1

The rectangles caculated after scrolling a DIV in an other DIV are not good.
Works the same way on FF 4.0.1 Windows XP.

Reproducible: Always

Steps to Reproduce:
1.Display the attached html file...
2.
3.

Actual Results:  
OK the first time the page is displayed. Never more than once!

Expected Results:  
Allways the same!
(Reporter)

Comment 1

6 years ago
Created attachment 537071 [details]
HTML file using jQuery
(Reporter)

Comment 2

6 years ago
Created attachment 537072 [details]
Picture referenced in HTML file.
(Reporter)

Comment 3

6 years ago
NOTE It seems to be correct (allways) when the scroll bars are are hidden (overflow:hidden)...
(Reporter)

Comment 4

6 years ago
SORRY: previous comment (#3) is wrong.
(Reporter)

Comment 5

6 years ago
Worse: scrollings themselves made ​​with the CSS attribute "overflow: hidden;", are" wrong"(wrong is subjective). The result of Opera is congruent with the case where the scroll bars are visibles. MSIE6 displays a "wrong" result in both axes, while for FF, the results on both axis are different.

Following: shorts HTML and JS, next attachement: screenshots

     <div id='div1' style='position:absolute;left:150px;top:150px;width:100px;height:100px;overflow:hidden;
      background-color:green;margin:10px;border:7px solid blue;padding:3px'>
      <div id='div10' style='width:150px;height:150px;background-color:yellow;
       margin:10px;border:7px solid silver;padding:3px'>
      Du texte...
      </div>
     </div>
     <div id='div2' style='position:absolute;left:300px;top:300px;width:100px;height:100px;overflow:auto; background-color:green;
     margin:10px;border:7px solid blue;padding:3px'>
      <div id='div20' style='width:150px;height:150px;background-color:yellow;
       margin:10px;border:7px solid silver;padding:3px'>
      Du texte...
      </div>
     </div>

gR=GetOutORect($("#div10"));
Chat.Print("gR: "+gR.toString());
DebugRectAdd(gR, "green");
$("#div1").scrollLeft(250);$("#div1").scrollTop(250);
gR=GetOutORect($("#div10"));
Chat.Print("gR: "+gR.toString());
DebugRectAdd(gR, "green");

gR=GetOutORect($("#div20"));
Chat.Print("gR: "+gR.toString());
DebugRectAdd(gR, "red");
gR=GetOutORect($("#div20"));
Chat.Print("gR: "+gR.toString());
DebugRectAdd(gR, "red");

$("#div2").scrollLeft(50);$("#div2").scrollTop(50);
gR=GetOutORect($("#div20"));
Chat.Print("gR: "+gR.toString());
DebugRectAdd(gR, "red");
(Reporter)

Comment 6

6 years ago
Created attachment 537138 [details]
Snapshots FF & Opera / Linux - MSIE6 / Wxp

Not really useful, indeed ?
(Reporter)

Comment 7

6 years ago
I understand where is the problem (if it is one): When a refresh is requested, casi all browsers leave the scroll bars of the window "as is" and refresh the display. The "onscroll" events are sent to the document as necessary. The internal elements that are Scrollable are probably reset to 0, and this last point is probably not done in Firefox. The way Firefox treat that problem is probably the best. The only problem remaining is that the scroll bars should be reset upon the initialization of the page for Fireox, as others do (except MSIE, in an axis).
Now I can "turn around" the "bug"...
Someone competent should perhaps cancel this bug 661714...
You need to log in before you can comment on or make changes to this bug.