harvesthq/chosen — pull request #475 by andrewfenn (2012-02-01 10:51:11+00:00)
Title: Stop IE 8 from calling onbeforeunload when clicking on a chosen field

I came across an issue which may affect others in the future.

When executing the test_active_click callback, the event should be canceled of default browser behavior with evt.preventDefault();

The reason being that if you are using onbeforeunload for something in IE 8 clicking on a chosen field counts as a link click for some reason and executes the onbeforeunload callback even though you are not leaving the page.