changhuixu / ngx-digit-only

An Angular directive to only allow [0-9] in the input box when typing, pasting or drag/dropping.
https://changhuixu.github.io/ngx-digit-only/
MIT License
161 stars 70 forks source link

Fix for Angular's Reactive Form on Firefox #42

Closed Meigyoku-Thmn closed 4 years ago

Meigyoku-Thmn commented 4 years ago

On Firefox, the "setRangeText" method doesn't trigger the "input" event, which Angular's Reactive Form relies on. So, when dropping or pasting value, then getting the value via Reactive Form, only the old value can be retrieved. This PR will fix it.