Fix arrow keys not working in Hop Web text fields, fixes #7833 - #7853
Open
mattcasters wants to merge 1 commit into
Open
Fix arrow keys not working in Hop Web text fields, fixes #7833#7853mattcasters wants to merge 1 commit into
mattcasters wants to merge 1 commit into
Conversation
Bare canvas-pan shortcuts were registered as RAP CANCEL_KEYS, so the browser never moved the caret. Leave navigation keys active but not cancelled, and stop HopGuiKeyHandler from stealing them inside text-like widgets.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes arrow (and Home/End/Page Up/Down) keys not moving the caret in Hop Web text fields. Shift+arrow already worked.
Why
Canvas pan shortcuts on bare arrow keys (
DragViewZoomBase) were registered as RAPCANCEL_KEYS. That callspreventDefaultin the browser for those keys globally, so text fields never get native caret movement.How
HopWebEntryPoint: keep bare navigation keys inACTIVE_KEYS(canvas pan still reaches the server when the graph has focus) but exclude them fromCANCEL_KEYS, same pattern as Ctrl+C/V/X.HopGuiKeyHandler: when focus is in Text/Combo/CCombo/StyledText, leave bare navigation keys (and Shift+arrow selection) to the widget so canvas pan does not fire while editing. Ctrl/Cmd/Alt combos still work.Testing
HopWebEntryPointTest(including new navigation-key case)Fixes #7833