mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
[JS] Handle correctly choice widgets where the display and the export values are different (issue #15815)
This commit is contained in:
parent
64786b4c93
commit
0c1ec946aa
8 changed files with 155 additions and 30 deletions
|
@ -137,6 +137,7 @@ class EventDispatcher {
|
|||
case "Keystroke":
|
||||
savedChange = {
|
||||
value: event.value,
|
||||
changeEx: event.changeEx,
|
||||
change: event.change,
|
||||
selStart: event.selStart,
|
||||
selEnd: event.selEnd,
|
||||
|
@ -170,6 +171,16 @@ class EventDispatcher {
|
|||
if (event.willCommit) {
|
||||
this.runValidation(source, event);
|
||||
} else {
|
||||
if (source.obj._isChoice) {
|
||||
source.obj.value = savedChange.changeEx;
|
||||
source.obj._send({
|
||||
id: source.obj._id,
|
||||
siblings: source.obj._siblings,
|
||||
value: source.obj.value,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const value = (source.obj.value = this.mergeChange(event));
|
||||
let selStart, selEnd;
|
||||
if (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue