3 ms·
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 programatica
by marijn 18y ago
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 http://marijn.haverbeke.nl/codemirror
- marijn 18y agoAnd 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)