Skip to content

ScrollLeft and ScrollTop reinitializing themselves in an iframe contentDocument #1945

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hilnius opened this issue Dec 17, 2014 · 6 comments
Closed

Comments

@hilnius
Copy link

hilnius commented Dec 17, 2014

When scrolling manually in an iframe using $($('#iframe').contentWindow).scrollTop(y).scrollLeft(x), the scrollLeft reinitializes the scrollTop
For a demo, see this plunker:
http://plnkr.co/edit/tbn2UJ72frQG16vA9Z5y?p=preview

@dmethvin
Copy link
Member

Oh that's a good one. It's funny, we go to extra lengths to get the correct window and then we don't use it when setting the values. So what's happening is that the iframe gets the parent window's value.

@dmethvin dmethvin added this to the 3.0.0 milestone Dec 17, 2014
@timmywil
Copy link
Member

Yea, we're good like that.

@timmywil
Copy link
Member

Easy fix, but it seems we need an iframe test.

@dmethvin
Copy link
Member

Oh and you're probably better using the iframe window's .scrollTo() when setting both.

@araghava
Copy link
Contributor

Is anyone working on this? If so can I take it? @hilnius

@mgol
Copy link
Member

mgol commented Dec 20, 2014

@araghava If you want, go for it!

araghava added a commit to araghava/jquery that referenced this issue Dec 21, 2014
araghava added a commit to araghava/jquery that referenced this issue Dec 21, 2014
araghava added a commit to araghava/jquery that referenced this issue Dec 23, 2014
@dmethvin dmethvin modified the milestones: 1.12/2.2, 3.0.0 Jan 7, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

5 participants