sanniassin / react-input-mask

Input masking component for React. Made with attention to UX.
MIT License
2.22k stars 258 forks source link

Does not work in frame #182

Closed amitava82 closed 4 years ago

amitava82 commented 5 years ago

I'm trying to use this along with react-frame-component. My component is rendered in an iframe. Issue seems to be in following line

var isDOMNode = typeof window !== 'undefined' && input instanceof window.Element; // workaround for react-test-renderer

isDOMNode evaluates to false returning null and throwing Uncaught TypeError: Cannot use 'in' operator to search for 'selectionStart' in null

dakiesse commented 5 years ago

I have the same issue

vladmelnikov commented 4 years ago

seems i have same issue in last chrome version library throws error Cannot read property 'addEventListener' of null

sanniassin commented 4 years ago

Fixed and published as 3.0.0-alpha.1 on npm.