Unexpected behavior of Vimium with closed custom elements
Describe the bug
In normal textarea and textarea in open custom elements (attachShadow({ mode: "open" })), shortcuts defined in Vimium are disabled and I can input these keys. However, in textarea in closed custom elements (attachShadow({ mode: "closed" })), shortcuts are handled by Vimium and I cannot input these keys.
Expected:
I can input keys defined as shortcuts to textarea in closed custom elements.
To Reproduce
Here is a reproduction code. https://github.com/mono0x/vimium-closed-custom-element-example
Browser and Vimium version
- Microsoft Edge 104.0.1293.54 and Vimium 1.67
- Google Chrome 104.0.5112.102 and Vimium 1.67
I have the same problem
Well it's indeed an issue since ShadowDom V1 has landed.
We may detect it using:
const getShadowRoot = (element) => {
if (Utils.isFirefox()) {
return element.openOrClosedShadowRoot
}
const isHTMLElement = "lang" in element
return isHTMLElement ? chrome.dom.openOrClosedShadowRoot(element) : null
}
Is there a fix in progress?