mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Allow cancelable on some custom javascript events.
This commit is contained in:
parent
9f2c06bcd3
commit
80eed213d9
5 changed files with 57 additions and 46 deletions
|
|
@ -27,7 +27,9 @@ export const
|
|||
return el;
|
||||
},
|
||||
|
||||
fireEvent = (name, detail) => dispatchEvent(new CustomEvent(name, {detail:detail})),
|
||||
fireEvent = (name, detail, cancelable) => dispatchEvent(
|
||||
new CustomEvent(name, {detail:detail, cancelable: !!cancelable})
|
||||
),
|
||||
|
||||
formFieldFocused = () => doc.activeElement && doc.activeElement.matches('input,textarea'),
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue