Open Bug 1117640 Opened 9 years ago Updated 2 years ago

Hiding iframe with display: none makes scrollable containers in its document forget scroll position

Categories

(Core :: Layout, defect)

defect

Tracking

()

People

(Reporter: hvdnew, Unassigned)

References

Details

(4 keywords)

Attachments

(2 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0
Build ID: 20141126041045

Steps to reproduce:

1. open two diff HTML pages in jd Tab on 1 HTML page using iframe. 
2. Both the child pages should have a div in them with height 50% and scrollable, put data to overflow the height and show scroll bar.
3. Scroll to some extent, and then switch to another tab.
4. Now, switch back to the old tab, you will see that the div is scrolled top automatically, which shouldn't happen.




Actual results:

Scrolled top.


Expected results:

Should remain where it was.
Keywords: ux-control
Summary: The issue comes when I use JQ Tabs in Mozilla. When i switch between tabs then the inner divs scrolls to top. this is handled in Google Chrome and Opera, but occurs in Mozilla. → The issue surfaces when I use JQ Tabs in Mozilla. When i switch between tabs then the inner divs scrolls to top. this is handled in Google Chrome and Opera, but occurs in Mozilla.
What is "JQ Tabs" or "JD Tabs"?

Please provide more details on how to reproduce this.
Flags: needinfo?(hvdnew)
(In reply to :Gijs Kruitbosch from comment #1)
> What is "JQ Tabs" or "JD Tabs"?
> 
> Please provide more details on how to reproduce this.

JQ Tabs are jQuery Tabs. 
http://jqueryui.com/tabs/
Flags: needinfo?(hvdnew)
(In reply to Harshvardhan Dadhich from comment #2)
> (In reply to :Gijs Kruitbosch from comment #1)
> > What is "JQ Tabs" or "JD Tabs"?
> > 
> > Please provide more details on how to reproduce this.
> 
> JQ Tabs are jQuery Tabs. 
> http://jqueryui.com/tabs/

Oh. So these are tabs on a web page that comment #0 is talking about. Can you provide a testcase?
Flags: needinfo?(hvdnew)
Product: Firefox → Core
(In reply to :Gijs Kruitbosch from comment #3)
> (In reply to Harshvardhan Dadhich from comment #2)
> > (In reply to :Gijs Kruitbosch from comment #1)
> > > What is "JQ Tabs" or "JD Tabs"?
> > > 
> > > Please provide more details on how to reproduce this.
> > 
> > JQ Tabs are jQuery Tabs. 
> > http://jqueryui.com/tabs/
> 
> Oh. So these are tabs on a web page that comment #0 is talking about. Can
> you provide a testcase?

Will this be helpful

Steps to reproduce:

1. open two diff HTML pages in jd Tab on 1 HTML page using iframe. 
2. Both the child pages should have a div in them with height 50% and scrollable, put data to overflow the height and show scroll bar.
3. Scroll to some extent, and then switch to another tab.
4. Now, switch back to the old tab, you will see that the div is scrolled top automatically, which shouldn't happen.




Actual results:

Scrolled top.


Expected results:

Should remain where it was.
Flags: needinfo?(hvdnew)
Attached file Testcase
Attachment #8549602 - Attachment mime type: text/plain → text/html
(In reply to Harshvardhan Dadhich from comment #4)
> Will this be helpful

I read comment #0 the first time, thanks. It's better if testcases are provided by the reporter, so that we don't start talking about different things or spend forever playing 20 questions as to the exact details of the testcase.

As it is, is attachment 8549602 [details] what you meant?
Component: Untriaged → Layout
Flags: needinfo?(hvdnew)
Keywords: testcase
OS: Windows 8.1 → All
Hardware: x86_64 → All
Summary: The issue surfaces when I use JQ Tabs in Mozilla. When i switch between tabs then the inner divs scrolls to top. this is handled in Google Chrome and Opera, but occurs in Mozilla. → Hiding iframe with display: none makes scrollable containers in its document forget scroll position
Attached file test_firefox.html -- test case (obsolete) —
this is the test case
Flags: needinfo?(hvdnew)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [parity-Chrome]
Comment on attachment 8549605 [details]
test_firefox.html -- test case

This breaks on bugzilla because it references http scripts - in any case, it's the same as the testcase I uploaded. Thank you for confirming it's accurate.
Attachment #8549605 - Attachment is obsolete: true
(In reply to :Gijs Kruitbosch from comment #8)
> Comment on attachment 8549605 [details]
> test_firefox.html -- test case
> 
> This breaks on bugzilla because it references http scripts - in any case,
> it's the same as the testcase I uploaded. Thank you for confirming it's
> accurate.

Yes thanks.
See Also: → 1305283
At least, with the attached reduced testcase, I can reproduce the problem on very old Firefox 0.8.
Whiteboard: [parity-Chrome] → [parity-Chrome][parity-Edge]
Version: 34 Branch → Trunk
Chrome and Edge works as expected...
Mass bug change to replace various 'parity' whiteboard flags with the new canonical keywords. (See bug 1443764 comment 13.)
Whiteboard: [parity-Chrome][parity-Edge]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: