1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

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;