-
Notifications
You must be signed in to change notification settings - Fork 5.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
Add ability to intercept keyboard events on gutter (with enableKeyboardAccessibility enabled) #5200
Comments
hey, thanks for reaching out. Trying to see what we would need to emit to help you out here. Looking at your code, seems you mainly need to know the row when a key is pressed on the gutter. Would emitting
|
I think I see why |
Did some testing and as far as I can tell, the change I sketched above should allow you to do what you want: ezgif-3-e405a4aeed.mp4 |
A |
The changes will be released in the next Ace release. |
Has been released as part of Ace 1.23.0 |
Describe the feature
When the gutter is hovered or an annotation icon is clicked, the editor emits the
gutterclick
andshowGutterTooltip
events. We intercept these events to hide the original tooltip and display the annotations in our own external error/warning pane. We'd like to do the same for the annotations activated through the keyboard (whenenableKeyboardAccessibility
is enabled), but there currently doesn't seem to be a way to do that.Use Case
Cloudscape's code editor is a wrapper around the ace editor. The annotations are displayed in a small expandable errors/warnings panel present in the status bar as an alternative to the annotation tooltips. We'd like to preserve this UX for keyboard users as well, but it's not currently technically possible.
Proposed Solution
We listen to
gutterclick
to determine which annotation was clicked on andshowGutterTooltip
to close the underlying tooltip. The new keyboard gutter handler would need to emit these events to support our use-case.gutterclick
equivalent for the keyboard handler end (or maybe it could be reused?)showGutterTooltip
seems to be a pretty input modality agnostic event name, so it seems reasonable to emit this from the keyboard handler as well.Other Information
For context:
And thank you for introducing enableKeyboardAccessibility, it's a huge keyboard accessibility win for the editor :)
Acknowledgements
ACE version used
1.20.0
The text was updated successfully, but these errors were encountered: