mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Fixed keydown event handling problem with shadow DOM.
Editable elements in shadow DOMs can not be detected in old version.
This commit is contained in:
parent
139c8a8cb5
commit
252e258a59
2 changed files with 25 additions and 1 deletions
|
@ -19,6 +19,7 @@ import {
|
|||
AutoPrintRegExp,
|
||||
DEFAULT_SCALE_VALUE,
|
||||
EventBus,
|
||||
getActiveOrFocusedElement,
|
||||
getPDFFileNameFromURL,
|
||||
isValidRotation,
|
||||
isValidScrollMode,
|
||||
|
@ -2819,7 +2820,7 @@ function webViewerKeyDown(evt) {
|
|||
|
||||
// Some shortcuts should not get handled if a control/input element
|
||||
// is selected.
|
||||
const curElement = document.activeElement || document.querySelector(":focus");
|
||||
const curElement = getActiveOrFocusedElement();
|
||||
const curElementTagName = curElement && curElement.tagName.toUpperCase();
|
||||
if (
|
||||
curElementTagName === "INPUT" ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue