widgets: prevent value-stateless widgets (tap buttons, clone, scripts, html and svg) from sending a value for cross-client synchronization (leads to unexpected script execution) and exclude them from state saves

This commit is contained in:
bordun 2020-11-26 11:13:57 +01:00
parent b3c10f1885
commit 2e9514cb88
7 changed files with 13 additions and 4 deletions

View file

@ -35,7 +35,7 @@ var StateManager = class StateManager {
if (filter && !filter(widget)) continue
if (widget.setValue && widget.getValue) {
if (widget.setValue && widget.getValue && !widget.noValueState) {
var v = widget.getValue()
@ -83,7 +83,7 @@ var StateManager = class StateManager {
var widget = widgetManager.widgets[i]
if (widget.sendValue) {
if (widget.sendValue && !widget.noValueState) {
widget.sendValue(null, options)
}
}