From 4e529bfa1d1ba72cf8073c6c927cfe7211b99876 Mon Sep 17 00:00:00 2001 From: Marty Pradere Date: Fri, 26 Jun 2026 10:28:51 -0600 Subject: [PATCH 1/3] Fix LovCombo dropping string selections under native RegExp.escape Newer browsers (Chrome, Firefox 140+) ship a native RegExp.escape that throws a TypeError on non-String input. Ext.ux.form.LovCombo.setValue() previously passed JSON.stringify(value) to RegExp.escape to avoid that, but JSON.stringify() quotes string values, so they no longer matched the raw, unquoted output of getCheckedValue() and every selection in a string-valued combo (e.g. the WNPRC EHR Time of Day multi-select) was silently dropped. Use String() instead: it yields a valid String for RegExp.escape without quoting string values, fixing both the numeric-valueField crash and the string-valueField regression. https://github.com/LabKey/internal-issues/issues/1266 --- core/webapp/Ext.ux.form.LovCombo.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/webapp/Ext.ux.form.LovCombo.js b/core/webapp/Ext.ux.form.LovCombo.js index 88bd0f0011c..0a38b401659 100644 --- a/core/webapp/Ext.ux.form.LovCombo.js +++ b/core/webapp/Ext.ux.form.LovCombo.js @@ -293,8 +293,10 @@ Ext.ux.form.LovCombo = Ext.extend(Ext.form.ComboBox, { this.store.suspendEvents(true); this.store.clearFilter(); this.store.each(function (r) { + // Issue 7144: String() (not JSON.stringify) so native RegExp.escape doesn't throw on a + // numeric valueField, while string values stay unquoted to match getCheckedValue() output. var checked = !(!v.match( - '(^|' + this.separator + ')' + RegExp.escape(JSON.stringify(r.get(this.valueField))) + '(^|' + this.separator + ')' + RegExp.escape(String(r.get(this.valueField))) + '(' + this.separator + '|$)')); r.set(this.checkField, checked); }, this); From ce26c838427854eeab88c780c9bc3bc69469b089 Mon Sep 17 00:00:00 2001 From: Marty Pradere Date: Fri, 26 Jun 2026 10:48:04 -0600 Subject: [PATCH 2/3] Reference issue 1266 (not 7144) in LovCombo setValue comment --- core/webapp/Ext.ux.form.LovCombo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/webapp/Ext.ux.form.LovCombo.js b/core/webapp/Ext.ux.form.LovCombo.js index 0a38b401659..87a1d833e6c 100644 --- a/core/webapp/Ext.ux.form.LovCombo.js +++ b/core/webapp/Ext.ux.form.LovCombo.js @@ -293,7 +293,7 @@ Ext.ux.form.LovCombo = Ext.extend(Ext.form.ComboBox, { this.store.suspendEvents(true); this.store.clearFilter(); this.store.each(function (r) { - // Issue 7144: String() (not JSON.stringify) so native RegExp.escape doesn't throw on a + // Issue 1266: String() (not JSON.stringify) so native RegExp.escape doesn't throw on a // numeric valueField, while string values stay unquoted to match getCheckedValue() output. var checked = !(!v.match( '(^|' + this.separator + ')' + RegExp.escape(String(r.get(this.valueField))) From 161631fdbdd23b55b8ff54116879f94cb252fa40 Mon Sep 17 00:00:00 2001 From: Marty Pradere Date: Fri, 26 Jun 2026 13:28:32 -0600 Subject: [PATCH 3/3] Use GH Issue prefix so the LovCombo comment links to GitHub 1266 --- core/webapp/Ext.ux.form.LovCombo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/webapp/Ext.ux.form.LovCombo.js b/core/webapp/Ext.ux.form.LovCombo.js index 87a1d833e6c..5bf01396cb2 100644 --- a/core/webapp/Ext.ux.form.LovCombo.js +++ b/core/webapp/Ext.ux.form.LovCombo.js @@ -293,7 +293,7 @@ Ext.ux.form.LovCombo = Ext.extend(Ext.form.ComboBox, { this.store.suspendEvents(true); this.store.clearFilter(); this.store.each(function (r) { - // Issue 1266: String() (not JSON.stringify) so native RegExp.escape doesn't throw on a + // GH Issue 1266: String() (not JSON.stringify) so native RegExp.escape doesn't throw on a // numeric valueField, while string values stay unquoted to match getCheckedValue() output. var checked = !(!v.match( '(^|' + this.separator + ')' + RegExp.escape(String(r.get(this.valueField)))