Skip to content

flag touchstart event handlers as passive: false #46

@dannywieser

Description

@dannywieser

Not a critical issue, but when the svg.select.js library is used in an app, chrome outputs several warnings to the console when an SVG element is selected:

[Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952

Taking a look at the code it appears that the different touchstart events in the code always trigger preventDefault, so it seems that all of the touchstart events in the library could be flagged as passive: false to eliminate these console warnings.

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