Add a guard to check if activeElement exists.
This commit is contained in:
@@ -470,12 +470,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
var activeElement = document.activeElement ? document.activeElement : ownerDocument.activeElement;
|
var activeElement = document.activeElement ? document.activeElement : ownerDocument.activeElement;
|
||||||
// go deeper if element is a webcomponent
|
|
||||||
while (activeElement.shadowRoot) {
|
if (activeElement) {
|
||||||
activeElement = activeElement.shadowRoot.activeElement;
|
// go deeper if element is a webcomponent
|
||||||
}
|
while (activeElement.shadowRoot) {
|
||||||
if ($(activeElement).is(":input,[contenteditable]")) {
|
activeElement = activeElement.shadowRoot.activeElement;
|
||||||
return;
|
}
|
||||||
|
if ($(activeElement).is(":input,[contenteditable]")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var deltaX = 0;
|
var deltaX = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user