Reset cursor position when focus is out of text field

This commit is contained in:
Calixte Denizet 2020-09-10 10:37:13 +02:00
parent f9d56320f5
commit 44b24fcc29

View File

@ -466,6 +466,10 @@ class TextWidgetAnnotationElement extends WidgetAnnotationElement {
storage.setValue(id, event.target.value);
});
element.addEventListener("blur", function (event) {
event.target.setSelectionRange(0, 0);
});
element.disabled = this.data.readOnly;
element.name = this.data.fieldName;