Skip to content

scrollLeft() does not always return an Integer #1198

Open
@jd-dean

Description

@jd-dean

Documentation issue: scrollLeft can return a Double in Chrome (tested in Chrome 96) and Edge.

Repro by changing the zoom level and scrolling horizontally.
https://jsfiddle.net/d6u2sjth/4/

MDN says: "Warning: On systems using display scaling, scrollLeft may give you a decimal value"
https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft

See also: #608

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions