Re:Show HN: A self-updating list of the most current useragents
by viraptor on Saturday December 17, 2022 @11:41PM
(#34035108)
But that doesn't require you to check the browser. You can force the same behaviour in every case, as you did with .blur() Neither feature detection nor user agent string matter here.
Re:Show HN: A self-updating list of the most current useragents
by toast0 on Saturday December 17, 2022 @11:49PM
(#34035141)
Feature detection doesn't work well for some bugs either.
How do you feature detect a crash bug? Or a leak? If you run the code that crashes, you've crashed the page and can't then run alternative code.
Re:Show HN: A self-updating list of the most current useragents
by Klonoar on Sunday December 18, 2022 @02:01PM
(#34041410)
You would not use the UA for this - there are plenty of other safer detection techniques.
Re:Show HN: A self-updating list of the most current useragents
by TheBrokenRail on Sunday December 18, 2022 @08:05PM
(#34046802)
To me, that just sounds like an pretty good argument to improve feature detection. Freezing user-agents and improving feature-detection aren't mutually-exclusive.
We have a single-page app with lots of dynamically created elements. We discovered a case where Chrome kept input focus on an element that was deleted and recreated, while Firefox didn't, resulting in different behavior if the user pressed Enter next after clicking on that element. (I don't know which of those is the bug, if either. We wanted the Firefox behavior so I hacked in a .blur() in the event handler for Chrome.)