Repository navigation
feat(core): one shared context request from a long press, a right click and Shift+F10 #8670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
8cb9f21
1e804e4
226b3a1
3b24c79
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [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. | ||
|
|
||
| @vjeux |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -560,6 +560,27 @@ the rest of that stream is the page's. A ctrl-wheel pinch keeps its stream, | |
| so the page never zooms for it, and a pan its lift released keeps its | ||
| momentum latched until the stream ends. | ||
|
|
||
| ## Context requests | ||
|
|
||
| `attachContextRequest(element, {onRequest})` (`contextRequest.ts`, internal) | ||
| is the one request a context menu answers (`spec:AST-094` FR43): a finger or | ||
| a pen held still for UIKit's long press, a pointer's context click (a right | ||
| click, a ctrl-click on macOS, a pen's barrel button), or Shift+F10 and the | ||
| context-menu key. Each gesture makes one request, reporting its `kind` | ||
| (`hold`, `pointer`, `keyboard`), its pointer, and its point (none from | ||
| the keyboard). The hold is an arena participant, so it loses to a claim | ||
| another recognizer made on that finger first (a reorder handle's hold); the | ||
| browser's own menu that a held finger, a held pen or a key also fires is | ||
| refused, never requested again; and a mouse held still makes no request. A | ||
| control that keeps its press for a hold-repeat owns only its hold: its right | ||
| click and Shift+F10 still reach the request. A right click or a ctrl-click on macOS starts no press. | ||
| The request listens on its own element only, and only while enabled. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Non-blocking (newly live check): this holds for the state read at attach ( |
||
|
|
||
| The hold is UIKit's long press, 500 ms and 10 px as a distance, and it | ||
| requests as it begins; `onHold` reports it committed, then ended at its lift | ||
| or cancelled. A hold disabled before it requests reports nothing, and a held | ||
| key's repeats make no request. | ||
|
|
||
| ## Time | ||
|
|
||
| Every input carries its own timestamp (`event.timeStamp`), and timers are | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.