Skip to content

Commit

Permalink
Merge pull request #11253 from Snuffleupagus/issue-7156
Browse files Browse the repository at this point in the history
Avoid handling keyboard shortcuts for `contentEditable` DOM elements (issue 7156)
  • Loading branch information
timvandermeij authored Oct 16, 2019
2 parents 4d0c759 + d67a5d3 commit 5057301
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5057301

Please sign in to comment.