From 0781823b7044de7dafb5f4452790be1f8270c058 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Wed, 12 Jul 2023 14:34:45 +0200 Subject: [PATCH 1/7] continue with v2.27.0 --- CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bd5c36f1..9e6b4dc55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,7 +35,23 @@ _Breaking developer changes, which may affect downstream projects or sites that [@xxxx]: https://github.com/xxxx --> +# Unreleased (2.27.0-dev) + +#### :tada: New Features +#### :sparkles: Usability & Accessibility +#### :scissors: Operations +#### :camera: Street-Level +#### :white_check_mark: Validation +#### :bug: Bugfixes +#### :earth_asia: Localization +#### :hourglass: Performance +#### :mortar_board: Walkthrough / Help +#### :hammer: Development + + # 2.26.0 +##### 2023-Jul-12 + #### :tada: New Features * Combo fields for tags with `yes/no` values now also display the `no` state and allow to toggle between the two states ([#7427]) #### :newspaper: News From 396d14262377489cea24cefba82db748d6262f4e Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Wed, 12 Jul 2023 22:00:42 +0200 Subject: [PATCH 2/7] fix crash when rendering and `email` UI field, fixes #9752 --- CHANGELOG.md | 8 ++++++++ modules/util/get_set_value.js | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e6b4dc55..eb06d5556 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,14 @@ _Breaking developer changes, which may affect downstream projects or sites that #### :hammer: Development +# 2.26.1 +##### 2023-Jul-12 + +* Fix crash when rendering and `email` UI field ([#9752]) + +[#9752]: https://github.com/openstreetmap/iD/issues/9752 + + # 2.26.0 ##### 2023-Jul-12 diff --git a/modules/util/get_set_value.js b/modules/util/get_set_value.js index 597fa9b7c..cca02ddbd 100644 --- a/modules/util/get_set_value.js +++ b/modules/util/get_set_value.js @@ -28,7 +28,11 @@ export function utilGetSetValue(selection, value, shouldUpdate) { } function stickyCursor(func) { + const supportedTypes = ['text', 'search', 'url', 'tel', 'password']; return function() { + if (!supportedTypes.includes(this.type)) { + return; + } const cursor = { start: this.selectionStart, end: this.selectionEnd }; func.apply(this, arguments); this.setSelectionRange(cursor.start, cursor.end); From 29b119705915d1e239d0f0e5b4af9ef542c9bfe7 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Wed, 12 Jul 2023 22:02:41 +0200 Subject: [PATCH 3/7] add code comment/documentation --- modules/util/get_set_value.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/util/get_set_value.js b/modules/util/get_set_value.js index cca02ddbd..da5ad741d 100644 --- a/modules/util/get_set_value.js +++ b/modules/util/get_set_value.js @@ -28,6 +28,8 @@ export function utilGetSetValue(selection, value, shouldUpdate) { } function stickyCursor(func) { + // only certain input element types allow manipulating the cursor + // see https://html.spec.whatwg.org/multipage/input.html#concept-input-apply const supportedTypes = ['text', 'search', 'url', 'tel', 'password']; return function() { if (!supportedTypes.includes(this.type)) { From cc740be721bbc48c872a0ab67b18e7575cbe4547 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Wed, 12 Jul 2023 22:29:54 +0200 Subject: [PATCH 4/7] typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb06d5556..5f86b2f9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,7 +52,7 @@ _Breaking developer changes, which may affect downstream projects or sites that # 2.26.1 ##### 2023-Jul-12 -* Fix crash when rendering and `email` UI field ([#9752]) +* Fix crash when rendering an `email` UI field ([#9752]) [#9752]: https://github.com/openstreetmap/iD/issues/9752 From 667a620a9f1896a62de25f3d745c393613c95184 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=E2=84=93e=20Hensel?= Date: Thu, 13 Jul 2023 21:04:33 +1200 Subject: [PATCH 5/7] fix the raw tag editor broken and strange cursor behaviour (#9766) * fix the raw tag editor broken * new approach * fix typo to satisfy github checks --- CHANGELOG.md | 2 +- modules/util/get_set_value.js | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f86b2f9a..7f330867c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -100,7 +100,7 @@ _Breaking developer changes, which may affect downstream projects or sites that * Upgrade OSM data dependencies: `id-tagging-schema` to v6.3, `osm-community-index` to 5.5.3 * Upgrade icon sets: `fortawesome` to v6.4, `temaki` to v5.4 * Upgrade `osm-auth` to v2.1, -* Upgrade dev dependecies, including the following major version upgrades: `glob` to v10, `marked` to v5, `cldr-core` and `cldr-localenames-full` to v43, `esbuild` to v0.18 +* Upgrade dev dependencies, including the following major version upgrades: `glob` to v10, `marked` to v5, `cldr-core` and `cldr-localenames-full` to v43, `esbuild` to v0.18 * Build icons from configured presets source and also process field value `icons` in `npm run build:data` [#8769]: https://github.com/openstreetmap/iD/pull/8769 diff --git a/modules/util/get_set_value.js b/modules/util/get_set_value.js index da5ad741d..1da96a135 100644 --- a/modules/util/get_set_value.js +++ b/modules/util/get_set_value.js @@ -28,13 +28,7 @@ export function utilGetSetValue(selection, value, shouldUpdate) { } function stickyCursor(func) { - // only certain input element types allow manipulating the cursor - // see https://html.spec.whatwg.org/multipage/input.html#concept-input-apply - const supportedTypes = ['text', 'search', 'url', 'tel', 'password']; return function() { - if (!supportedTypes.includes(this.type)) { - return; - } const cursor = { start: this.selectionStart, end: this.selectionEnd }; func.apply(this, arguments); this.setSelectionRange(cursor.start, cursor.end); @@ -49,5 +43,12 @@ export function utilGetSetValue(selection, value, shouldUpdate) { shouldUpdate = (a, b) => a !== b; } + // only certain input element types allow manipulating the cursor + // see https://html.spec.whatwg.org/multipage/input.html#concept-input-apply + const supportedTypes = ['text', 'search', 'url', 'tel', 'password']; + if (!supportedTypes.includes(this.type)) { + return selection.each(setValue(value, shouldUpdate)); + } + return selection.each(stickyCursor(setValue(value, shouldUpdate))); } From 3a932f7b4f763bd0e7f4101097c4b7a939fd92a3 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Thu, 13 Jul 2023 13:52:58 +0200 Subject: [PATCH 6/7] prepare changelog for v2.26.2 --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f330867c..920f1e4a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,14 @@ _Breaking developer changes, which may affect downstream projects or sites that #### :hammer: Development +# 2.26.2 +##### 2023-Jul-13 + +* Fix broken in raw tag editor ([#9766], thanks [@k-yle]) + +[#9766]: https://github.com/openstreetmap/iD/issues/9766 + + # 2.26.1 ##### 2023-Jul-12 From 57cb425b0ddd3d94d6674f23729a6d7901854df0 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Thu, 13 Jul 2023 14:18:06 +0200 Subject: [PATCH 7/7] fix markdown link --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 920f1e4a2..0a3a71baf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,7 +54,7 @@ _Breaking developer changes, which may affect downstream projects or sites that * Fix broken in raw tag editor ([#9766], thanks [@k-yle]) -[#9766]: https://github.com/openstreetmap/iD/issues/9766 +[#9766]: https://github.com/openstreetmap/iD/pull/9766 # 2.26.1