mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-02-24 14:57:26 +08:00
Bugfix: autofocus was triggered when view resized
This commit is contained in:
parent
cc054054c2
commit
70e32e0905
1 changed files with 1 additions and 1 deletions
|
@ -79,7 +79,6 @@ const
|
|||
const endShowHide = e => {
|
||||
if (e.target === vmDom) {
|
||||
if (vmDom.classList.contains('animate')) {
|
||||
autofocus(vmDom);
|
||||
vm.afterShow?.();
|
||||
} else {
|
||||
vmDom.close();
|
||||
|
@ -98,6 +97,7 @@ const
|
|||
vmDom.backdrop.style.zIndex = 3000 + (visiblePopups.size * 2);
|
||||
}
|
||||
vm.keyScope.set();
|
||||
setTimeout(()=>autofocus(vmDom),1);
|
||||
requestAnimationFrame(() => { // wait just before the next paint
|
||||
vmDom.offsetHeight; // force a reflow
|
||||
vmDom.classList.add('animate'); // trigger the transitions
|
||||
|
|
Loading…
Reference in a new issue