News for hackers. Stuff that matters.
Re:Opera: please use bug detection, not browser detection by marijn on Thursday July 03, 2008 @03:53PM (#235568)
In general, I agree. Unfortunately, detecting some bugs is either a lot of work or almost impossible -- you can't, for example, generate DOM events programatically, so bugs in event handling are very tricky to test for.

On the bright side, it is often possible to write your fix in a non-invasive way, or adjust your code to not depend on the buggy behaviour. (For example, some browsers will still fire a keypress event if you cancel the corresponding keydown event. My code editor[1] ended up checking again in the keypress handler for keys that should have been handled, and cancelling them again.)

[1] http://marijn.haverbeke.nl/codemirror

Re:Opera: please use bug detection, not browser detection by marijn on Friday July 04, 2008 @07:22AM (#236141)
And just today, I had to fix a Firefox bug where the cursor in an editable document would be displayed in the wrong place. Note that this is purely visual -- it acted as if it were in a different place than it showed. Good luck detecting that. So yes... there we go again: /Gecko/.test(navigator.userAgent)