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

window.scrollTo #1760

Closed
MynockSpit opened this Issue Jul 28, 2015 · 4 comments

Comments

Projects
None yet
6 participants
@MynockSpit

window.scrollTo

@Ugoku

This comment has been minimized.

Show comment
Hide comment
@Ugoku

Ugoku Jul 29, 2015

Contributor

MDN says "DOM Level 0" under Specification, which according to Quirksmode means it's supported in Netscape 2+ which essentially means all browsers since then (1995!) support this.

Contributor

Ugoku commented Jul 29, 2015

MDN says "DOM Level 0" under Specification, which according to Quirksmode means it's supported in Netscape 2+ which essentially means all browsers since then (1995!) support this.

@Benimation

This comment has been minimized.

Show comment
Hide comment

-1

@MynockSpit MynockSpit closed this Sep 26, 2017

@ZLevine

This comment has been minimized.

Show comment
Hide comment
@ZLevine

ZLevine Apr 19, 2018

I request we reopen this -- while window.scrollTo is supported far back by many browsers, many versions (like Chrome on Android 6-8) throw errors when you use this format:

// this changes the scrolling behavior to "smooth"
window.scrollTo({
    top: 1000,
    behavior: "smooth"
});

Instead of using:

window.scrollTo( 0, 1000 );

Some of these errors include:

Uncaught TypeError: Failed to execute 'scrollTo' on 'Window': 2 arguments required, but only 1 present.
Uncaught TypeError: Failed to execute 'scrollTo' on 'Window': No function was found that matched the signature provided.

I'm testing whether providing a third argument (like left) resolves this, but I think this belongs here.

ZLevine commented Apr 19, 2018

I request we reopen this -- while window.scrollTo is supported far back by many browsers, many versions (like Chrome on Android 6-8) throw errors when you use this format:

// this changes the scrolling behavior to "smooth"
window.scrollTo({
    top: 1000,
    behavior: "smooth"
});

Instead of using:

window.scrollTo( 0, 1000 );

Some of these errors include:

Uncaught TypeError: Failed to execute 'scrollTo' on 'Window': 2 arguments required, but only 1 present.
Uncaught TypeError: Failed to execute 'scrollTo' on 'Window': No function was found that matched the signature provided.

I'm testing whether providing a third argument (like left) resolves this, but I think this belongs here.

@xianshenglu

This comment has been minimized.

Show comment
Hide comment
@xianshenglu

xianshenglu Jun 5, 2018

window.scrollTo( 0, 1000 );

I just tested IE11 and Edge,supported. However , it will scroll to top if you pass an object .

window.scrollTo( 0, 1000 );

I just tested IE11 and Edge,supported. However , it will scroll to top if you pass an object .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment