I found input mask works weird under ShadowDOM.
I think Node.ownerDocument API returns only Document, not ShadowDOM's root Document.
Therefore, I change from ownerDocument to getRootNode() API .
This API returns not only the root node(Document) but also root node of Shadow DOM.
I tested with build codes in my cases, and it works fine.
I found input mask works weird under ShadowDOM. I think Node.ownerDocument API returns only Document, not ShadowDOM's root Document. Therefore, I change from ownerDocument to getRootNode() API . This API returns not only the root node(Document) but also root node of Shadow DOM. I tested with build codes in my cases, and it works fine.