From b7492749210dc60a4a4cdc3818f85015c007ba8a Mon Sep 17 00:00:00 2001 From: bordun Date: Tue, 31 Mar 2020 09:52:39 +0200 Subject: [PATCH 1/2] notification: safe removal --- src/client/ui/notifications.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/ui/notifications.js b/src/client/ui/notifications.js index 22a106a6..2a5f329a 100644 --- a/src/client/ui/notifications.js +++ b/src/client/ui/notifications.js @@ -46,7 +46,7 @@ class Toast { this.html.classList.add('remove') setTimeout(()=>{ - el.removeChild(this.html) + if (el.contains(this.html)) el.removeChild(this.html) }, 200) } From 63c8dea9cd15d80a9bb846c34bb6f19badaa2ed3 Mon Sep 17 00:00:00 2001 From: bordun Date: Tue, 31 Mar 2020 09:52:53 +0200 Subject: [PATCH 2/2] button: avoid loop on tap release --- src/client/widgets/basics/button.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/widgets/basics/button.js b/src/client/widgets/basics/button.js index e5ab02ce..16a9888c 100644 --- a/src/client/widgets/basics/button.js +++ b/src/client/widgets/basics/button.js @@ -158,8 +158,8 @@ class Button extends Widget { if (options.send) this.sendValue() if (options.sync) this.changed(options) - if (newstate && this.getProp('mode') === 'tap') { - this.setValue(this.getProp('off'), {sync: false, send: false}) + if (newstate && this.getProp('mode') === 'tap' && !options.tapRelease) { + this.setValue(this.getProp('off'), {sync: false, send: false, tapRelease: true}) } }