diff --git a/CHANGELOG.md b/CHANGELOG.md index 9eba264b..e29baf40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,8 @@ - bug fixes - misc: sending typed arguments (`{type, value}` objects) should override the widget's `typeTags` definition - multixy: errors when `ephemeral` is `true` - + - scripting: `setVar` not affecting all widgets when mutliple widgets match provided id + - widgets - renamed `script` to `onValue`, `draw` to `onDraw`, `touch` to `onTouch` - added `onCreate` script property to all widgets diff --git a/src/client/widgets/scripts/script-vm.js b/src/client/widgets/scripts/script-vm.js index 42f1b95b..78cd77e3 100644 --- a/src/client/widgets/scripts/script-vm.js +++ b/src/client/widgets/scripts/script-vm.js @@ -108,7 +108,7 @@ class ScriptVm extends Vm { Object.keys(widgetManager.idRoute).filter(key => key.match(new RegExp('^' + id.replace(/\*/g, '.*') + '$'))) ).filter(w => w !== widget) } else { - widgets = this.resolveId(id).slice(0, 1) + widgets = this.resolveId(id) }