feat: add support for keyboard initialized menu popup (#38903)
* feat: add support for keyboard initialized menu popup * Update docs/api/menu.md Co-authored-by: Erick Zhao <erick@hotmail.ca> * fix: add patch to chromium for keyboard accessibility menu behavior * refactor: s/initiatedByKeyboard/sourceType * fix: ignore initial mouse event to retain keyboard initiated focus * Update docs/api/menu.md Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com> --------- Co-authored-by: Erick Zhao <erick@hotmail.ca> Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com>
This commit is contained in:
parent
607e71d563
commit
499d893040
13 changed files with 282 additions and 33 deletions
|
@ -80,6 +80,10 @@ The `menu` object has the following instance methods:
|
|||
* `positioningItem` number (optional) _macOS_ - The index of the menu item to
|
||||
be positioned under the mouse cursor at the specified coordinates. Default
|
||||
is -1.
|
||||
* `sourceType` string (optional) _Windows_ _Linux_ - This should map to the `menuSourceType`
|
||||
provided by the `context-menu` event. It is not recommended to set this value manually,
|
||||
only provide values you receive from other APIs or leave it `undefined`.
|
||||
Can be `none`, `mouse`, `keyboard`, `touch`, `touchMenu`, `longPress`, `longTap`, `touchHandle`, `stylus`, `adjustSelection`, or `adjustSelectionReset`.
|
||||
* `callback` Function (optional) - Called when menu is closed.
|
||||
|
||||
Pops up this menu as a context menu in the [`BrowserWindow`](browser-window.md).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue