knyghty / django-admin-keyboard-shortcuts

MIT License
15 stars 0 forks source link

Ignore keyup events when focused on a textarea or text input element. #18

Closed eviljeff closed 5 months ago

eviljeff commented 5 months ago

Fixes #13 in a pretty trivial way - just returns immediately when the focused element is a text field/area.

coveralls commented 5 months ago

Pull Request Test Coverage Report for Build 9428468040

Details


Totals Coverage Status
Change from base Build 9427898636: 0.0%
Covered Lines: 32
Relevant Lines: 39

💛 - Coveralls
coveralls commented 5 months ago

Pull Request Test Coverage Report for Build 9428468040

Details


Totals Coverage Status
Change from base Build 9427898636: 0.0%
Covered Lines: 32
Relevant Lines: 39

💛 - Coveralls
knyghty commented 5 months ago

Had a bit of an extra thought... maybe if you use a modifier e.g. alt, the shortcut should still work. Otherwise you have to defocus all inputs to save an object, which seems very annoying.

Not sure if people use alt in text fields to have fancy letters, need to think about that.

eviljeff commented 5 months ago

Had a bit of an extra thought... maybe if you use a modifier e.g. alt, the shortcut should still work. Otherwise you have to defocus all inputs to save an object, which seems very annoying.

Not sure if people use alt in text fields to have fancy letters, need to think about that.

Do you mean the shortcuts that are already "Alt + ❓" (e.g. "Alt + A"); or the keys that aren't alt+ (e.g "g + i") should work in a text field if you prepend Alt?

knyghty commented 5 months ago

e.g. alt+s should still work when focused on a text field

coveralls commented 5 months ago

Pull Request Test Coverage Report for Build 9480926349

Details


Totals Coverage Status
Change from base Build 9471424827: 0.0%
Covered Lines: 32
Relevant Lines: 42

💛 - Coveralls
eviljeff commented 5 months ago

Updated and finished - the Alt key shortcuts are still enabled and the input types that ignore keyup events is restricted.

coveralls commented 5 months ago

Pull Request Test Coverage Report for Build 9481368247

Details


Totals Coverage Status
Change from base Build 9471424827: 0.0%
Covered Lines: 32
Relevant Lines: 42

💛 - Coveralls
coveralls commented 5 months ago

Pull Request Test Coverage Report for Build 9481368247

Details


Totals Coverage Status
Change from base Build 9471424827: 0.0%
Covered Lines: 32
Relevant Lines: 42

💛 - Coveralls
coveralls commented 5 months ago

Pull Request Test Coverage Report for Build 9481368247

Details


Totals Coverage Status
Change from base Build 9471424827: 0.0%
Covered Lines: 32
Relevant Lines: 42

💛 - Coveralls