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

NEW
Unassigned

Status

()

Core
Layout
3 years ago
a year ago

People

(Reporter: Harshvardhan Dadhich, Unassigned)

Tracking

({testcase, ux-control})

Trunk
testcase, ux-control
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [parity-Chrome][parity-Edge])

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

3 years ago
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.
(Reporter)

Updated

3 years ago
Keywords: ux-control
(Reporter)

Updated

3 years ago
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.

Comment 1

3 years ago
What is "JQ Tabs" or "JD Tabs"?

Please provide more details on how to reproduce this.
Flags: needinfo?(hvdnew)
(Reporter)

Comment 2

3 years ago
(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)

Comment 3

3 years ago
(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?
Component: Untriaged → Untriaged
Flags: needinfo?(hvdnew)
Product: Firefox → Core
(Reporter)

Comment 4

3 years ago
(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)

Comment 5

3 years ago
Created attachment 8549602 [details]
Testcase

Updated

3 years ago
Attachment #8549602 - Attachment mime type: text/plain → text/html

Comment 6

3 years ago
(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
(Reporter)

Comment 7

3 years ago
Created attachment 8549605 [details]
test_firefox.html -- test case

this is the test case
Flags: needinfo?(hvdnew)

Updated

3 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [parity-Chrome]

Comment 8

3 years ago
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
(Reporter)

Comment 9

3 years ago
(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.

Updated

a year ago
See Also: → bug 1305283

Comment 10

a year ago
Created attachment 8795926 [details]
Reduced no jquery testcase

At least, with the attached reduced testcase, I can reproduce the problem on very old Firefox 0.8.

Updated

a year ago
Whiteboard: [parity-Chrome] → [parity-Chrome][parity-Edge]
Version: 34 Branch → Trunk

Comment 11

a year ago
Chrome and Edge works as expected...
You need to log in before you can comment on or make changes to this bug.