diff --git a/CHANGELOG.md b/CHANGELOG.md index 7952d8617..be69b8673 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -67,6 +67,7 @@ _Breaking developer changes, which may affect downstream projects or sites that * Fix too dim markers of selected/hovered photo of some street level imagery layers ([#10755], thanks [@draunger]) * Fix `+` symbol appearing in changeset comments from external tools ([#10766], thanks [@k-yle]) * Fix `destination_sign` relations from being corrupted when splitting a way ([#10646], thanks [@k-yle]) +* Fix combobox dropdown menu sticking around under certain conditions (e.g. while editing the role of a relation member and deselecting a feature #10319) #### :earth_asia: Localization * Add `housename` to address format in Bolivia ([#10727]) #### :hourglass: Performance diff --git a/modules/ui/combobox.js b/modules/ui/combobox.js index 524d31733..aab796ced 100644 --- a/modules/ui/combobox.js +++ b/modules/ui/combobox.js @@ -154,18 +154,8 @@ export function uiCombobox(context, klass) { .on('scroll.combo-scroll', render, true); } - function hide() { - if (_comboHideTimerID) { - window.clearTimeout(_comboHideTimerID); - _comboHideTimerID = undefined; - } - - container.selectAll('.combobox') - .remove(); - - container - .on('scroll.combo-scroll', null); + _hide(container); } @@ -515,7 +505,22 @@ export function uiCombobox(context, klass) { } +function _hide(container) { + if (_comboHideTimerID) { + window.clearTimeout(_comboHideTimerID); + _comboHideTimerID = undefined; + } + + container.selectAll('.combobox') + .remove(); + + container + .on('scroll.combo-scroll', null); +} + + uiCombobox.off = function(input, context) { + _hide(context.container()); input .on('focus.combo-input', null) .on('blur.combo-input', null)