mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
[Editor] Avoid to add a new line when hitting enter with a selected freetext editor
This commit is contained in:
parent
e914870c14
commit
8f6635bacf
2 changed files with 16 additions and 1 deletions
|
@ -485,6 +485,8 @@ class FreeTextEditor extends AnnotationEditor {
|
|||
keydown(event) {
|
||||
if (event.target === this.div && event.key === "Enter") {
|
||||
this.enterInEditMode();
|
||||
// Avoid to add an unwanted new line.
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue