Skip to content

Update activecode keybindings#1138

Open
ascholerChemeketa wants to merge 1 commit intoRunestoneInteractive:mainfrom
ascholerChemeketa:improve-ac-hotkeys
Open

Update activecode keybindings#1138
ascholerChemeketa wants to merge 1 commit intoRunestoneInteractive:mainfrom
ascholerChemeketa:improve-ac-hotkeys

Conversation

@ascholerChemeketa
Copy link
Contributor

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-content elements. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant