diff --git a/CHANGELOG.md b/CHANGELOG.md index 738af287..5711ee0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - widgets - all: add `html` property to allow inserting custom content in widgets (label, value, etc) and style it with the `css` property. + - scripting: `send()` now ignores the widget's `bypass` property (allows bypassing default messages and define custom ones). - custom module - automatically reload custom module when the file is modified diff --git a/resources/docs/docs/widgets/scripting.md b/resources/docs/docs/widgets/scripting.md index 81cdf34f..46325da8 100644 --- a/resources/docs/docs/widgets/scripting.md +++ b/resources/docs/docs/widgets/scripting.md @@ -79,6 +79,8 @@ If the event that triggered the script's execution was initiated by a user inter If the event that triggered the script's execution was not initiated by a user interaction, this function will have no effect. +This function ignores the widget's `bypass` property. + ---- #### `getProp(id, name)` diff --git a/src/client/widgets/scripts/script-vm.js b/src/client/widgets/scripts/script-vm.js index 0c1a1452..521eec8d 100644 --- a/src/client/widgets/scripts/script-vm.js +++ b/src/client/widgets/scripts/script-vm.js @@ -100,7 +100,7 @@ class ScriptVm extends Vm { var widget = this.getWidget() if (widget.builtIn) widget = widget.parent - widget.sendValue(overrides) + widget.sendValue(overrides, {force: true}) }