mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 10:15:37 +02:00
Disable keyboard shortcuts if current control is INPUT element
This commit is contained in:
parent
3a396b4834
commit
5affc0d794
1 changed files with 2 additions and 0 deletions
|
@ -964,6 +964,8 @@ window.addEventListener('pagechange', function pagechange(evt) {
|
||||||
|
|
||||||
window.addEventListener('keydown', function keydown(evt) {
|
window.addEventListener('keydown', function keydown(evt) {
|
||||||
var curElement = document.activeElement;
|
var curElement = document.activeElement;
|
||||||
|
if (curElement && curElement.tagName == 'INPUT')
|
||||||
|
return;
|
||||||
var controlsElement = document.getElementById('controls');
|
var controlsElement = document.getElementById('controls');
|
||||||
while (curElement) {
|
while (curElement) {
|
||||||
if (curElement === controlsElement)
|
if (curElement === controlsElement)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue