From 49492a0e06aef71f90e96ab3ed50098df0f4ce93 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Wed, 5 Jun 2024 19:56:56 +0200 Subject: [PATCH] keep chosen dropdown item if user clicked on one fixes a bug where in case multiple items with the same `value` are present in the combobox' dropdown, always the first one is returned in the `accept` event --- modules/ui/combobox.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/ui/combobox.js b/modules/ui/combobox.js index 3914fd186..275e86ce3 100644 --- a/modules/ui/combobox.js +++ b/modules/ui/combobox.js @@ -439,7 +439,9 @@ export function uiCombobox(context, klass) { var val = utilGetSetValue(input); thiz.setSelectionRange(val.length, val.length); - d = _fetched[val]; + if (!d) { + d = _fetched[val]; + } dispatch.call('accept', thiz, d, val); hide(); }