Skip to content

Window scrollTop resets scrollLeft and vice versa #135

@kaittodesk

Description

@kaittodesk

Don't know if it is a feature or a bug, but when scrollTop or scrollLeft is called on already scrolled window, it will reset value that was not changed.

For example:

window.scrollTo(10, 10)
$(window).scrollLeft(20)

The second line will change the scroll position from 10, 10 to 20, 0. I think it should change scroll position to 20, 10 as it makes more sense, because the function name references to only one coordinate.

What do you think? Should it be changed or is it working as intended?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions