mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-16 13:59:27 +02:00
fix crash when rendering and email UI field, fixes #9752
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user