mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-23 00:29:50 +02:00
fix crash when rendering and email UI field, fixes #9752
This commit is contained in:
@@ -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