Bug 232123 - First pointerdown event lost after context menu is triggered
Summary: First pointerdown event lost after context menu is triggered
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: Safari 15
Hardware: Mac (Intel) macOS 10.15
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-10-21 18:02 PDT by Andrew O
Modified: 2021-10-28 18:03 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew O 2021-10-21 18:02:57 PDT
Overview:

Pointer down events in Safari fail after triggering a context menu


Steps to Reproduce:

I've created a simple test case here: https://jsfiddle.net/pyzt3wf1/1/ which consists of a single div with some standard UI event listeners (mousedown, mouseup, pointerdown, pointerup, click ).

1) Right click (or ctrl-click) anywhere in content area of the browser window on the linked example to trigger the browser's context menu.
2) Dismiss the context menu by clicking outside of it.
3) Click on the "click me" button to trigger that div's event listeners, which should trigger console logs viewable in either Safari's developer tools or within jsfiddle's built-in console, viewable by clicking ">_ Console(beta)" at the bottom of the preview frame.


Actual Results:

All of the events fire their respective callback, except for pointerdown. The console reads:
mousedown
pointerup
mouseup
click

Subsequent clicks on the div appear to trigger events correctly.


Expected Results:

All of the events should fire their respective callback. The console should read:
pointerdown
mousedown
pointerup
mouseup
click

Date & Hardware: This bug has been reproduced on Safari 15.0 on both OS 10.15.7 and 11.6 . Similar behavior was experienced with Safari 14, although it hasn't been narrowed down to a reproducible case until now.
Comment 1 Radar WebKit Bug Importer 2021-10-28 18:03:16 PDT
<rdar://problem/84787733>