mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
[JS] Use beforeinput event to trigger a keystroke event in the sandbox
- it aims to fix issue #14307; - this event has been added recently in Firefox and we can now use it; - fix few bugs in aform.js or in annotation_layer.js; - add some integration tests to test keystroke events (see `AFSpecial_Keystroke`); - make dispatchEvent in the quickjs sandbox async.
This commit is contained in:
parent
922dac035c
commit
6ac296e48e
9 changed files with 254 additions and 45 deletions
|
@ -151,6 +151,14 @@ class EventDispatcher {
|
|||
value: savedChange.value,
|
||||
selRange: [savedChange.selStart, savedChange.selEnd],
|
||||
});
|
||||
} else {
|
||||
// Entry is not valid (rc == false) and it's a commit
|
||||
// so just clear the field.
|
||||
source.obj._send({
|
||||
id: source.obj._id,
|
||||
value: "",
|
||||
selRange: [0, 0],
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue