mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Resolve #265 regarding shortcuts in certain input fields.
As we want other shortcuts do work in input fields (which couldn't in previous releases).
This commit is contained in:
parent
54f48fbe4d
commit
a503329b77
5 changed files with 35 additions and 28 deletions
|
|
@ -32,6 +32,11 @@ export const
|
|||
|
||||
fireEvent = (name, detail) => dispatchEvent(new CustomEvent(name, {detail:detail})),
|
||||
|
||||
formFieldFocused = () => doc.activeElement && doc.activeElement.matches('input,textarea'),
|
||||
|
||||
registerShortcut = (keys, modifiers, scopes, method) =>
|
||||
shortcuts.add(keys, modifiers, scopes, () => formFieldFocused() ? true : method()),
|
||||
|
||||
addEventsListener = (element, events, fn, options) =>
|
||||
events.forEach(event => element.addEventListener(event, fn, options)),
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue