Merge pull request #11253 from Snuffleupagus/issue-7156

Avoid handling keyboard shortcuts for `contentEditable` DOM elements (issue 7156)
This commit is contained in:
Tim van der Meij 2019-10-17 00:26:40 +02:00 committed by GitHub
commit 50573019b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;