RobinHerbots / Inputmask

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

Plans for removal of `navigator.userAgent` #2571

Closed stsrki closed 1 year ago

stsrki commented 2 years ago

Hello.

Recently we received a notification from one of our users to let us know that Google is making the navigator.userAgent obsolete. According to this documentation https://blog.chromium.org/2021/05/update-on-user-agent-string-reduction.html

I must admit I wasn't aware that this was a problem so it got me a little off guard. So I had to check where it is used and indeed it was used in a few places, where Inputmask library was one of them.

My question is. Are there any plans to remove the usage of navigator.userAgent from Inputmask?

RobinHerbots commented 2 years ago

@stsrki ,

Thx for the info. I will read the documentation and see how to make the necessary changes.

RobinHerbots commented 1 year ago

@stsrki,

For backward compatiobility it's best to use both features. I can use the userAgentData if available and otherwise fallback to the old useragent string. I will push a commit soon.

stsrki commented 1 year ago

@RobinHerbots thanks!