Update activecode keybindings#1138
Open
ascholerChemeketa wants to merge 1 commit intoRunestoneInteractive:mainfrom
Open
Update activecode keybindings#1138ascholerChemeketa wants to merge 1 commit intoRunestoneInteractive:mainfrom
ascholerChemeketa wants to merge 1 commit intoRunestoneInteractive:mainfrom
Conversation
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.
Every activecode is currently bound to window keydown, which is overbroad. Save button attempts to trigger multiple activecodes.
This changes the bindings to be local to the editor for the activecode and removes JQuery from that section.
Changes the handling for avoiding Tab trapping slightly but preserves behavior. Now when editor gains focus we check if it was due to tab. If so, the CodeMirror tab bindings are cleared. If not, they are reset to normal.
I don't know why the old code was specifically looking for
.tab-contentelements. I might need to readd code for that. But it seems like if we enter via tab, we should leave to the next focusable item via tab, not try to steer to somewhere in particular.