From cde9c931c8491588c548ba55a855f374335a774d Mon Sep 17 00:00:00 2001 From: Mario Pietsch Date: Sun, 25 Jan 2026 19:58:52 +0100 Subject: [PATCH] Select widget handle default parameter refresh (#9617) * select widget handle default parameter refresh * Add change note --- core/modules/widgets/select.js | 14 +++++++------- .../#9617 - select-widget-refresh-default.tid | 12 ++++++++++++ 2 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 editions/tw5.com/tiddlers/releasenotes/5.4.0/#9617 - select-widget-refresh-default.tid diff --git a/core/modules/widgets/select.js b/core/modules/widgets/select.js index eea56cae7..b05af5dbb 100644 --- a/core/modules/widgets/select.js +++ b/core/modules/widgets/select.js @@ -82,8 +82,8 @@ SelectWidget.prototype.handleChangeEvent = function(event) { if(this.selectMultiple == false) { var value = this.getSelectDomNode().value; } else { - var value = this.getSelectValues() - value = $tw.utils.stringifyList(value); + var value = this.getSelectValues(); + value = $tw.utils.stringifyList(value); } this.wiki.setText(this.selectTitle,this.selectField,this.selectIndex,value); // Trigger actions @@ -118,7 +118,7 @@ SelectWidget.prototype.setSelectValue = function() { } } // Assign it to the select element if it's different than the current value - if (this.selectMultiple) { + if(this.selectMultiple) { value = value === undefined ? "" : value; var select = this.getSelectDomNode(); var child, @@ -156,14 +156,14 @@ SelectWidget.prototype.getSelectValues = function() { select = this.getSelectDomNode(); result = []; options = select && select.options; - for (var i=0; i