-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[uiActions] Improve context menu keyboard support #70705
[uiActions] Improve context menu keyboard support #70705
Conversation
Pinging @elastic/kibana-app-arch (Team:AppArch) |
@elasticmachine merge upstream |
In mouse event list logic seems it is open the menu at a click one before the last on Lens pie chart visualization. In determining position of the context menu, I thought we wanted to emit the element and location of the click in the context object that trigger emits, curious why you opted for mouse detection logic instead? |
…ions-menu-position
…ibana into bugfix/ui-actions-menu-position
@streamich, thanks for catching that 👍 should be fixed.
As noted in private discussion:
|
💚 Build SucceededBuild metrics
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, checked on Mac Chrome/Firefox.
While testing we found this bug in elastic-charts: elastic/elastic-charts#748 |
* Improves position resolution logic by also tracking last clicked element. * Adds ownFocus prop, so can pick menu item with keyboard. * Also track if target element was removed from DOM. In that case tries to use previous element. won't work all the time, but works nicely in case context menu trigger by item in other context menu. Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Improves position resolution logic by also tracking last clicked element. * Adds ownFocus prop, so can pick menu item with keyboard. * Also track if target element was removed from DOM. In that case tries to use previous element. won't work all the time, but works nicely in case context menu trigger by item in other context menu. Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
Closes #67130
ownFocus
prop, so can pick menu item with keyboard.Opened menu with keyboard:
If trigger element removed from DOM, reuses previous trigger if possible:
Release notes
Multiple chart actions context menu positioning fixes.
Checklist
Delete any items that are not applicable to this PR.