mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-23 08:38:06 +02:00
Don't avoid to execute the Blur callback when blurring a text field (bug 1863910)
This commit is contained in:
parent
42f3d57365
commit
ec396c2150
4 changed files with 49 additions and 3 deletions
|
@ -1288,7 +1288,9 @@ class TextWidgetAnnotationElement extends WidgetAnnotationElement {
|
|||
}
|
||||
elementData.lastCommittedValue = target.value;
|
||||
elementData.commitKey = 1;
|
||||
elementData.focused = true;
|
||||
if (!this.data.actions?.Focus) {
|
||||
elementData.focused = true;
|
||||
}
|
||||
});
|
||||
|
||||
element.addEventListener("updatefromsandbox", jsEvent => {
|
||||
|
@ -1397,7 +1399,9 @@ class TextWidgetAnnotationElement extends WidgetAnnotationElement {
|
|||
if (!elementData.focused || !event.relatedTarget) {
|
||||
return;
|
||||
}
|
||||
elementData.focused = false;
|
||||
if (!this.data.actions?.Blur) {
|
||||
elementData.focused = false;
|
||||
}
|
||||
const { value } = event.target;
|
||||
elementData.userValue = value;
|
||||
if (elementData.lastCommittedValue !== value) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue