From 9f63261831f6fe55bc9fcdbb1c7518ff0843b1fa Mon Sep 17 00:00:00 2001 From: Mustaq Ahmed Date: Tue, 19 Oct 2021 16:13:37 -0400 Subject: [PATCH] Added a new event to communicate context menu dismissal. --- sections/event-interfaces.txt | 1 + sections/event-types.txt | 45 +++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/sections/event-interfaces.txt b/sections/event-interfaces.txt index 5f375d0..ab4c017 100644 --- a/sections/event-interfaces.txt +++ b/sections/event-interfaces.txt @@ -85,6 +85,7 @@ The following chart describes the inheritance structure of the interfaces descri +| compositionupdate | Sync | Yes | Element | CompositionEvent | No | None | +| compositionend | Sync | Yes | Element | CompositionEvent | No | None | +| contextmenu | Sync | Yes | Element | PointerEvent | Yes | Invoke a context menu if supported | + +| contextmenudismiss| Async | Yes | Element | PointerEvent | No | None | +| dblclick | Sync | Yes | Element | MouseEvent | No | Varies: for targets with an associated | | | | | | | | activation behavior, executes the activation | | | | | | | | behavior; for focusable targets, | diff --git a/sections/event-types.txt b/sections/event-types.txt index 28205aa..f7241ef 100644 --- a/sections/event-types.txt +++ b/sections/event-types.txt @@ -1529,6 +1529,51 @@ myDiv.addEventListener("auxclick", function(e) { before or after the EVENT{mouseup} event.

+
contextmenudismiss
+ + ++------------------+--------------------------------------------------------------------------------------+ event-definition + =| % | | + +------------------+--------------------------------------------------------------------------------------+ + +| Type | contextmenudismiss | + +| Interface | {{PointerEvent}} | + +| Sync / Async | Async | + +| Bubbles | Yes | + +| Trusted Targets | Element | + +| Cancelable | No | + +| Composed | Yes | + +| Default action | None | + +| Context
| | + ++------------------+--------------------------------------------------------------------------------------+ + + A user agent MUST dispatch this event before closing a context menu. + If the system context menu has been suppressed by canceling the + EVENT{contextmenu} event, the user agent still MUST dispatch this + event to allow the page script to close a custom context menu under the same + condition like a system context menu. + + Every EVENT{contextmenu} event MUST be followed by a corresponding + EVENT{contextmenudismiss} event with an identical + {{Event}}.{{Event/target}}. However, if the target of the + EVENT{contextmenu} event has been removed from DOM before firing the + EVENT{contextmenudismiss} event, the latter will be fired to the HTML + body element. +
dblclick
++------------------+--------------------------------------------------------------------------------------+ event-definition