From cd5ba2b00060673fde7be7345a82a13c2b453b3b Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Sun, 7 Jul 2024 23:33:29 +0200 Subject: [PATCH] transitionend listen to `opacity` as `top` changed on resize of view --- dev/Knoin/Knoin.js | 4 ++-- plugins/demo-account/demo.js | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/dev/Knoin/Knoin.js b/dev/Knoin/Knoin.js index 0d89d40e9..df348375c 100644 --- a/dev/Knoin/Knoin.js +++ b/dev/Knoin/Knoin.js @@ -74,10 +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` + // transitionend is called for each property, so we only listen to `opacity` // as defined in CSS by `dialog:not(.animate)` const endShowHide = e => { - if (e.target === vmDom && 'top' === e.propertyName) { + if (e.target === vmDom && 'opacity' === e.propertyName) { if (vmDom.classList.contains('animate')) { vm.afterShow?.(); fireEvent('rl-vm-visible', vm); diff --git a/plugins/demo-account/demo.js b/plugins/demo-account/demo.js index 67938d8c3..97edc3357 100644 --- a/plugins/demo-account/demo.js +++ b/plugins/demo-account/demo.js @@ -11,12 +11,10 @@ */ addEventListener('rl-vm-visible', e => { const view = e.detail; -/* Not working if (view && 'PopupsCompose' === view.viewModelTemplateID) { - view.to(rl.settings.get('DemoEmail')); + view.to('<' + rl.settings.get('Email') + '>'); // view.to(view.from()); } -*/ if (view && 'PopupsAsk' === view.viewModelTemplateID) { view.passphrase('demo'); }