From 4f086eb63fea35df1b2c5261c337a75cc1e6da0a Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 20 Jun 2018 16:53:21 +0200 Subject: [PATCH] push: add active class to container element --- src/browser/js/app/widgets/buttons/push.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/browser/js/app/widgets/buttons/push.js b/src/browser/js/app/widgets/buttons/push.js index 0b38b69d..3f8860c6 100644 --- a/src/browser/js/app/widgets/buttons/push.js +++ b/src/browser/js/app/widgets/buttons/push.js @@ -76,6 +76,7 @@ class Push extends Widget { if (typeof v == 'object' && v !== null) v = v.value if (v===this.getProp('on') || (this.getProp('on') != null && v === this.getProp('on').value && v !== undefined)) { this.widget.classList.add('active') + this.container.classList.add('active') this.active = 1 this.lastChanged = 'active' this.updateValue() @@ -83,6 +84,7 @@ class Push extends Widget { if (options.sync) this.changed(options) } else if (v===this.getProp('off') || (this.getProp('off') != null && v === this.getProp('off').value && v !== undefined)) { this.widget.classList.remove('active') + this.container.classList.remove('active') this.active = 0 this.lastChanged = 'active' this.updateValue()