mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-30 17:00:35 +02:00
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
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user