mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Merge pull request #15631 from calixteman/15627
[JS] Avoid to trigger a commit event on 'ENTER' when the textfield is multiline
This commit is contained in:
commit
27b251ac99
1 changed files with 4 additions and 1 deletions
|
@ -1191,7 +1191,10 @@ class TextWidgetAnnotationElement extends WidgetAnnotationElement {
|
|||
let commitKey = -1;
|
||||
if (event.key === "Escape") {
|
||||
commitKey = 0;
|
||||
} else if (event.key === "Enter") {
|
||||
} else if (event.key === "Enter" && !this.data.multiLine) {
|
||||
// When we've a multiline field, "Enter" key is a key as the other
|
||||
// hence we don't commit the data (Acrobat behaves the same way)
|
||||
// (see issue #15627).
|
||||
commitKey = 2;
|
||||
} else if (event.key === "Tab") {
|
||||
commitKey = 3;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue