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