mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Avoid handling keyboard shortcuts for contentEditable
DOM elements (issue 7156)
The issue has been open for years now, and has even been marked with `5-good-beginner-bug` for *months*, without any movement. Considering just how simple the suggested solution is, I'm submitting this patch just to close out a long-standing issue.
This commit is contained in:
parent
4d0c759b7f
commit
d67a5d395c
1 changed files with 2 additions and 1 deletions
|
@ -2283,7 +2283,8 @@ function webViewerKeyDown(evt) {
|
|||
let curElementTagName = curElement && curElement.tagName.toUpperCase();
|
||||
if (curElementTagName === 'INPUT' ||
|
||||
curElementTagName === 'TEXTAREA' ||
|
||||
curElementTagName === 'SELECT') {
|
||||
curElementTagName === 'SELECT' ||
|
||||
(curElement && curElement.isContentEditable)) {
|
||||
// Make sure that the secondary toolbar is closed when Escape is pressed.
|
||||
if (evt.keyCode !== 27) { // 'Esc'
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue