From 24e514fa99958eb046655cbcfdf51b928577c145 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Tue, 2 May 2023 12:53:30 +0200 Subject: [PATCH] defer loading of static combo options fixes a bug where `multi/many/semiCombo` options are not selectable immediately after they were removed from a field, when the field does not use taginfo to fetch options --- CHANGELOG.md | 1 + modules/ui/fields/combo.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fb805d9a..f44ad0da5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,7 @@ _Breaking developer changes, which may affect downstream projects or sites that #### :camera: Street-Level #### :white_check_mark: Validation #### :bug: Bugfixes +* Fix `multi/many/semiCombo` options for not being selectable immediately after removing them for fields with predefined options #### :earth_asia: Localization * Send `Accept-Language` header on Nominatim API calls ([#9501], thanks [@k-yle]) * Add Address and Phone Format for India ([#9482], thanks [@biswajit-k]) diff --git a/modules/ui/fields/combo.js b/modules/ui/fields/combo.js index 1c601dc4a..5fa4b1540 100644 --- a/modules/ui/fields/combo.js +++ b/modules/ui/fields/combo.js @@ -167,7 +167,7 @@ export function uiFieldCombo(field, context) { setTaginfoValues('', setPlaceholder); } else { selection.call(_combobox, attachTo); - setStaticValues(setPlaceholder); + setTimeout(() => setStaticValues(setPlaceholder), 0); } }