Add a guard to check if activeElement exists.
This commit is contained in:
parent
b5d0958e82
commit
81dd8e9eb0
@ -50,6 +50,7 @@ function bindKeyboardHandler(element, i) {
|
||||
}
|
||||
|
||||
var activeElement = document.activeElement ? document.activeElement : i.ownerDocument.activeElement;
|
||||
if (activeElement) {
|
||||
// go deeper if element is a webcomponent
|
||||
while (activeElement.shadowRoot) {
|
||||
activeElement = activeElement.shadowRoot.activeElement;
|
||||
@ -57,6 +58,7 @@ function bindKeyboardHandler(element, i) {
|
||||
if (h.isEditable(activeElement)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var deltaX = 0;
|
||||
var deltaY = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user