mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 13:39:22 +03:00
Display <dialog> as flex so that <header> is always top on scroll
This commit is contained in:
parent
e4e86d0347
commit
3950ff049c
3 changed files with 10 additions and 28 deletions
|
|
@ -77,7 +77,7 @@ const
|
|||
// show/hide popup/modal
|
||||
const endShowHide = e => {
|
||||
if (e.target === vmDom) {
|
||||
if (vmDom.classList.contains('show')) {
|
||||
if (vmDom.classList.contains('animate')) {
|
||||
autofocus(vmDom);
|
||||
vm.onShowWithDelay && vm.onShowWithDelay();
|
||||
} else {
|
||||
|
|
@ -98,13 +98,13 @@ const
|
|||
vm.keyScope.set();
|
||||
requestAnimationFrame(() => { // wait just before the next paint
|
||||
vmDom.offsetHeight; // force a reflow
|
||||
vmDom.classList.add('show'); // trigger the transitions
|
||||
vmDom.classList.add('animate'); // trigger the transitions
|
||||
});
|
||||
} else {
|
||||
visiblePopups.delete(vm);
|
||||
vm.onHide && vm.onHide();
|
||||
vm.keyScope.unset();
|
||||
vmDom.classList.remove('show'); // trigger the transitions
|
||||
vmDom.classList.remove('animate'); // trigger the transitions
|
||||
}
|
||||
arePopupsVisible(0 < visiblePopups.size);
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue