Merge pull request #219 from MathieuLorber/input-in-shadowdom
ShadowDom form elements are considered for preventing scrolling by keyevent
This commit is contained in:
commit
d4ec7fca6d
@ -430,7 +430,16 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hovered || $(document.activeElement).is(":input,[contenteditable]")) {
|
if (!hovered) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var activeElement = document.activeElement;
|
||||||
|
// go deeper if element is a webcomponent
|
||||||
|
while (activeElement.shadowRoot) {
|
||||||
|
activeElement = activeElement.shadowRoot.activeElement;
|
||||||
|
}
|
||||||
|
if ($(activeElement).is(":input,[contenteditable]")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user