Merge pull request #12360 from calixteman/12359

Reset cursor position when focus is out of text field
This commit is contained in:
Tim van der Meij 2020-09-10 23:11:35 +02:00 committed by GitHub
commit 8cfcd7a488
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;