mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 07:35:55 +08:00
Bugfix: prevent multiple afterShow() and afterHide() due to transitionend
on multiple properties
This commit is contained in:
parent
60c35f7c12
commit
325197175b
|
@ -74,8 +74,10 @@ const
|
|||
// vmDom.addEventListener('close', () => vm.modalVisible(false));
|
||||
|
||||
// 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 => {
|
||||
if (e.target === vmDom) {
|
||||
if (e.target === vmDom && 'top' === e.propertyName) {
|
||||
if (vmDom.classList.contains('animate')) {
|
||||
vm.afterShow?.();
|
||||
fireEvent('rl-vm-visible', vm);
|
||||
|
|
Loading…
Reference in a new issue