mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 17:55:37 +02:00
Reset cursor position when focus is out of text field
This commit is contained in:
parent
f9d56320f5
commit
44b24fcc29
1 changed files with 4 additions and 0 deletions
|
@ -466,6 +466,10 @@ class TextWidgetAnnotationElement extends WidgetAnnotationElement {
|
||||||
storage.setValue(id, event.target.value);
|
storage.setValue(id, event.target.value);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
element.addEventListener("blur", function (event) {
|
||||||
|
event.target.setSelectionRange(0, 0);
|
||||||
|
});
|
||||||
|
|
||||||
element.disabled = this.data.readOnly;
|
element.disabled = this.data.readOnly;
|
||||||
element.name = this.data.fieldName;
|
element.name = this.data.fieldName;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue