fix contenteditable check #2650

This commit is contained in:
Hakim El Hattab 2020-04-22 11:59:23 +02:00
parent d8675a9759
commit f138f507a0

View file

@ -160,7 +160,7 @@ export default class Keyboard {
this.Reveal.onUserInput( event ); this.Reveal.onUserInput( event );
// Is there a focused element that could be using the keyboard? // Is there a focused element that could be using the keyboard?
let activeElementIsCE = document.activeElement && document.activeElement.contentEditable !== 'inherit'; let activeElementIsCE = document.activeElement && document.activeElement.isContentEditable === true;
let activeElementIsInput = document.activeElement && document.activeElement.tagName && /input|textarea/i.test( document.activeElement.tagName ); let activeElementIsInput = document.activeElement && document.activeElement.tagName && /input|textarea/i.test( document.activeElement.tagName );
let activeElementIsNotes = document.activeElement && document.activeElement.className && /speaker-notes/i.test( document.activeElement.className); let activeElementIsNotes = document.activeElement && document.activeElement.className && /speaker-notes/i.test( document.activeElement.className);