RobinHerbots / Inputmask

Input Mask plugin
https://robinherbots.github.io/Inputmask/
MIT License
6.36k stars 2.18k forks source link

fix: Inputmask works weird under ShadowDOM #2753

Open leehyelee opened 8 months ago

leehyelee commented 8 months ago

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.