Closed Bug 1829967 Opened 2 years ago Closed 2 years ago

Consider sending a touchcancel event if the context menu is opened (i.e. not preventDefaulted) rather than not opening the context menu on Linux (and Mac)

Categories

(Core :: Panning and Zooming, task, P3)

task

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox116 --- fixed

People

(Reporter: hiro, Assigned: hiro)

References

Details

Attachments

(2 files)

Historically on Linux and Mac we send a touchcancel event when we process a long-tap event and the contextmenu event was preventDefaulted. (Note that here is a test case)

But that's opposed to my intuitive. If a site author uses preventDefault() in contextmenu event handlers, it means to avoid opening context menus and the site wants to keep handle subsequent touch events?

In fact on Chrome's RDM on Linux a touchcancel event is fired when the context menu is opened via a long-tap. If the contextmenu event was preventDefaulted, no touchcancel event occurs.

I am going to fix this prior to bug 1719855, since without fixing this bug 1719855 is pretty confusing.

Assignee: nobody → hikezoe.birchill
Status: NEW → ASSIGNED

mouselongtap events are internally used for accessible caret on desktops.
Whether to fire a touchcancel event here should just depend on whether a context
menu opens or not.

The modified test, helper_long_tap.html, is mostly now same as the Android one.
A difference is on the Linux/Mac version we observe a mouselongtap event after a
contextmenu event wasn't preventDefaulted.

Depends on D180636

Attachment #9338561 - Attachment description: Bug 1829967 - Make the condition whether to fire a touchcancel event in ProcessLongTap independent from mouselongtap event results. r?botond!,TYLin → Bug 1829967 - Make the content response and the condition whether to fire a touchcancel event in ProcessLongTap independent from mouselongtap event results. r?botond!,TYLin
Pushed by hikezoe.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ed3317e79644 Make the content response and the condition whether to fire a touchcancel event in ProcessLongTap independent from mouselongtap event results. r=TYLin,botond https://hg.mozilla.org/integration/autoland/rev/45b3685dc883 Fire a touchcanel event when a context menu opens rather than the context menu doesn't open. r=botond
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
Regressions: 1830660
Blocks: 1719855
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: