Skip to content

Pointerdown event doesn't fire on Safari after drag eventΒ #2322

Open
@jeroenwienk

Description

@jeroenwienk

πŸ“ Feedback

There is a bug in Safari where after a drag the pointerdown event doesnt fire on the first click https://bugs.webkit.org/show_bug.cgi?id=202287. I have provided an example where this behavior can be reproduced with react-dnd. Since dnd is in the works for react-aria I thought I would bring this issue up. Not sure if this was encountered during development.

The result in react aria because of this is that anything using usePress is requiring 2 clicks to fire when using the drag and drop api.

Right now I've made a check for myself but I'm not sure how dangerous this is(Since usePress is checking for PointerEvent being defined).

if (isMACOS) {
  window.PointerEvent = undefined;
}

Maybe react-aria needs a global flag that can be set to prevent using PointerEvents? What do you guys think is the goto solution for this?

πŸ”¦ Context

πŸ’» Code Sample

https://codesandbox.io/s/tender-volhard-g5f6j

🌍 Your Environment

Software Version(s)
[Package name]
Browser
Operating System

🧒 Your Company/Team

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions