Skip to content
This repository was archived by the owner on Mar 31, 2021. It is now read-only.
This repository was archived by the owner on Mar 31, 2021. It is now read-only.

Passive event listener can't be prevented in mxEvent #507

@MJomaa

Description

@MJomaa

Description

In mxEvent.js this code

//To prevent window zoom on trackpad pinch
if (evt.ctrlKey) 
{
    evt.preventDefault();
}

in combination with this line

mxEvent.addListener(target, 'wheel', wheelHandler);

will result into a passive listener according to https://www.chromestatus.com/features/6662647093133312

Effects

The call to evt.preventDefault(); will result into an error for passive listeners.

image

Fix

Check if { passive: false } is supported and apply it for this event listener or remove the troubling code. Also you can remove the unused variable var delta = -evt.deltaY; just below the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    notstalePrevent stale bot from closing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions