JedWatson / react-input-autosize

Auto-resizing input field for React
https://jedwatson.github.io/react-input-autosize
MIT License
769 stars 178 forks source link

IE-specific -ms-clear styling breaks CSP #105

Closed joux3 closed 6 years ago

joux3 commented 7 years ago

The inline style element used by the -ms-clear workaround breaks Content Security Policy. Would it be possible to have an extra prop that would control whether such a workaround is applied (I don't believe the current approach can be made CSP-safe)?

(Extra note: both the element and the style element refers to state.id which should probably be state.inputId which is defined in the constructor).

JedWatson commented 6 years ago

Thanks for calling that out, I've made it optional and updated the docs on how to work around this yourself if you need to.