mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +03:00
Added: addEventsListener() and addEventsListeners()
This commit is contained in:
parent
c270f0ad9a
commit
5990addfef
14 changed files with 484 additions and 464 deletions
|
|
@ -19,7 +19,8 @@ import {
|
|||
$htmlCL,
|
||||
Settings,
|
||||
SettingsGet,
|
||||
leftPanelDisabled
|
||||
leftPanelDisabled,
|
||||
addEventsListener
|
||||
} from 'Common/Globals';
|
||||
|
||||
import { UNUSED_OPTION_VALUE } from 'Common/Consts';
|
||||
|
|
@ -89,7 +90,7 @@ class AppUser extends AbstractApp {
|
|||
}, interval);
|
||||
|
||||
const fn = (ev=>$htmlCL.toggle('rl-ctrl-key-pressed', ev.ctrlKey)).debounce(500);
|
||||
['keydown','keyup'].forEach(t => doc.addEventListener(t, fn));
|
||||
addEventsListener(doc, ['keydown','keyup'], fn);
|
||||
|
||||
shortcuts.add('escape,enter', '', Scope.All, () => rl.Dropdowns.detectVisibility());
|
||||
}
|
||||
|
|
@ -344,9 +345,7 @@ class AppUser extends AbstractApp {
|
|||
}
|
||||
|
||||
// add pointermove ?
|
||||
['touchstart','mousemove','keydown'].forEach(
|
||||
t => doc.addEventListener(t, SettingsUserStore.delayLogout, {passive:true})
|
||||
);
|
||||
addEventsListener(doc, ['touchstart','mousemove','keydown'], SettingsUserStore.delayLogout, {passive:true});
|
||||
SettingsUserStore.delayLogout();
|
||||
|
||||
// initLeftSideLayoutResizer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue