Skip to content

Commit

Permalink
Reset cursor position when focus is out of text field
Browse files Browse the repository at this point in the history
  • Loading branch information
calixteman committed Sep 10, 2020
1 parent f9d5632 commit 44b24fc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/display/annotation_layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

1 comment on commit 44b24fc

@CetinSert
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #13229

Please sign in to comment.