You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 17fcb15
Browse filesBrowse the repository at this point in the historyBrowse files
feat(core): one shared context request from a long press, a right click and Shift+F10 (#8670)
* feat(core): one context request for a hold, a right click and Shift+F10
A context menu should open the same way from a held finger or pen,
a right click, and Shift+F10 or the context-menu key. Each component
wired its own handlers, so the rules differed: a held finger on
Android could open the browser's own menu beside Astryx's.
attachContextRequest(element, {onRequest}) is the one internal request
a context menu answers. Each gesture makes one request, naming its
input (a hold, a pointer or the keyboard), so a keyboard-opened menu
can focus its first row. A held key's repeats make no request. The
hold is UIKit's long press and an arena participant, so it loses
to a claim another recognizer made first. A hold disabled before
it requests reports nothing. A mouse held still makes no request. A
control that keeps its press for a hold-repeat owns only its hold,
while its right click and Shift+F10 still reach the request. The
browser's own menu is refused once, for a finger while it is down
inside the element and for a pen during and right after any hold of it
there. Inside nested requests, a right click or a key reaches only the
innermost. It listens on its own element only, and only while enabled.
* Merge main
* docs(specs): name the shared context request module in AST-094 FR43
FR43 says one shared context request answers a long press, a right
click and Shift+F10. The requirement now names that module,
gestures/contextRequest.ts, and what it does: one request per gesture,
the input that made it, the browser's own menu kept closed, and a hold
that loses to an earlier claim. The headless context menu makes its
request through it, and ContextMenu through that menu, so every menu
opens by the same rules. The record's path list links the module.
* fix(gestures): share the context request's answered set across copies
A right click or a key inside nested context requests reaches only
the innermost: the first request adds the event to a set, and the
others skip it. The set was module state, so a request in a swizzled
copy of Core kept its own set and answered the same event again. It
is now a shared weak set under a registered key, as the
shared-identity check asks for module state an export uses.
[chore] Internal: one shared context request from a long press, a right click, or Shift+F10 and the context-menu key (AST-094 FR43), reporting which input made it, one per gesture. A held finger's hold loses to a claim another gesture already made on that finger, and a control that keeps its press for a hold-repeat owns only its hold, so its right click and Shift+F10 still reach the request. A held pen's own context menu event is refused like a held finger's. The hold is UIKit's long press and requests as it begins. Not exported from the package entry point.
0 commit comments