Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sadly it's another IE6 hangover.

event.preventDefault() does not work in IE6, you have to use event.returnValue = false;. To not break standard compliant browsers you have to have if(event.preventDefault) event.preventDefault();, but by then you have three lines doing what one could do, you give up and use return false;. (and not use child click events).

Fortunately with IE6 usage under 5% now, I'm sure your boss wouldn't notice it.



jQuery's normalized event object handles that issue automatically when you call its preventDefault method().




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: