button: avoid loop on tap release

This commit is contained in:
bordun 2020-03-31 09:52:53 +02:00
parent b749274921
commit 63c8dea9cd

View file

@ -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})
}
}