mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Bugfix: prevent multiple afterShow() and afterHide() due to transitionend on multiple properties
This commit is contained in:
parent
60c35f7c12
commit
325197175b
1 changed files with 3 additions and 1 deletions
|
|
@ -74,8 +74,10 @@ const
|
||||||
// vmDom.addEventListener('close', () => vm.modalVisible(false));
|
// vmDom.addEventListener('close', () => vm.modalVisible(false));
|
||||||
|
|
||||||
// show/hide popup/modal
|
// show/hide popup/modal
|
||||||
|
// transitionend is called for each property, so we only listen to `top`
|
||||||
|
// as defined in CSS by `dialog:not(.animate)`
|
||||||
const endShowHide = e => {
|
const endShowHide = e => {
|
||||||
if (e.target === vmDom) {
|
if (e.target === vmDom && 'top' === e.propertyName) {
|
||||||
if (vmDom.classList.contains('animate')) {
|
if (vmDom.classList.contains('animate')) {
|
||||||
vm.afterShow?.();
|
vm.afterShow?.();
|
||||||
fireEvent('rl-vm-visible', vm);
|
fireEvent('rl-vm-visible', vm);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue