From 2ecce0e47eca9038b1a1035523dba0fff38bfc58 Mon Sep 17 00:00:00 2001 From: Gabor Hodi Date: Sun, 23 Jan 2022 18:51:14 +0100 Subject: [PATCH 1/3] [Issue8871] Do not open disabled localized combobox when clicking on it --- modules/ui/combobox.js | 2 ++ modules/ui/fields/localized.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/ui/combobox.js b/modules/ui/combobox.js index 57555078f..df3d13700 100644 --- a/modules/ui/combobox.js +++ b/modules/ui/combobox.js @@ -77,6 +77,7 @@ export function uiCombobox(context, klass) { function mousedown(d3_event) { if (d3_event.button !== 0) return; // left click only + if (input.classed('disabled')) return; _tDown = +new Date(); // clear selection @@ -95,6 +96,7 @@ export function uiCombobox(context, klass) { function mouseup(d3_event) { input.on('mouseup.combo-input', null); if (d3_event.button !== 0) return; // left click only + if (input.classed('disabled')) return; if (input.node() !== document.activeElement) return; // exit if this input is not focused var start = input.property('selectionStart'); diff --git a/modules/ui/fields/localized.js b/modules/ui/fields/localized.js index ac02435ab..547eed76b 100644 --- a/modules/ui/fields/localized.js +++ b/modules/ui/fields/localized.js @@ -213,7 +213,7 @@ export function uiFieldLocalized(field, context) { localizedInputs.selectAll('button, input') .classed('disabled', !!isLocked) .attr('readonly', isLocked || null); - + selection.selectAll('.combobox-caret').classed('nope', true); function addNew(d3_event) { From c308e2fb5360b7e98fdb8fca819de628ab0f65e1 Mon Sep 17 00:00:00 2001 From: Gabor Hodi Date: Thu, 27 Jan 2022 12:20:45 +0100 Subject: [PATCH 2/3] [Issue8871] Update changelog.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f02c8fda..c317f22b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -66,6 +66,7 @@ _Breaking developer changes, which may affect downstream projects or sites that * Fix a bug where the validator might show wrong tagging suggestions for a preset if another preset has a partial match ([#8828], thanks [@bhousel]) * Show correct vintage and other metadata for "Esri World Imagery"'s higher zoom levels * Fix wrong order of route relation members after a split operation ([#8519], thanks [@tpetillon]) +* Do not open disabled localized combobox when clicking on it ([#8871]) #### :earth_asia: Localization * Deprecate ~`t.html`~ for providing localized texts, which is replaced by the new method `t.append` which directly and safely appends the localized strings to the DOM ([#8817]) #### :hourglass: Performance From d9996e9492d57835bf25abf0b611c58ca5d0c482 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Fri, 28 Jan 2022 12:33:38 +0100 Subject: [PATCH 3/3] add missing @mention and link to issue --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c317f22b7..a7d8970de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -66,7 +66,7 @@ _Breaking developer changes, which may affect downstream projects or sites that * Fix a bug where the validator might show wrong tagging suggestions for a preset if another preset has a partial match ([#8828], thanks [@bhousel]) * Show correct vintage and other metadata for "Esri World Imagery"'s higher zoom levels * Fix wrong order of route relation members after a split operation ([#8519], thanks [@tpetillon]) -* Do not open disabled localized combobox when clicking on it ([#8871]) +* Do not open disabled localized combobox when clicking on it ([#8871], thanks [@hodigabi]) #### :earth_asia: Localization * Deprecate ~`t.html`~ for providing localized texts, which is replaced by the new method `t.append` which directly and safely appends the localized strings to the DOM ([#8817]) #### :hourglass: Performance @@ -99,6 +99,7 @@ _Breaking developer changes, which may affect downstream projects or sites that [#8835]: https://github.com/openstreetmap/iD/pull/8835 [#8836]: https://github.com/openstreetmap/iD/issues/8836 [#8839]: https://github.com/openstreetmap/iD/pull/8839 +[#8871]: https://github.com/openstreetmap/iD/issues/8871 [@k-yle]: https://github.com/k-yle [@tpetillon]: https://github.com/tpetillon [@mbrzakovic]: https://github.com/mbrzakovic