Modal Dialog IE onclick problem

Modal Dialog IE onclick problem


There is a problem with the new jQueryUI 1.8.1 & jQuery 1.4.2 releases regarding the Dialog widget.

The problem occurs when I have an onclick event on a link and also a href. This only happens in Internet Explorer and only when the dialog is modal!
  1. e.g. <a id="testLink2" href="javascript:alert('href javascript');" onclick="alert('onclick event');return false;">Test Link 2</a>
The onclick event is fired correctly (first), however, the href is also fired afterwards (even though I have a return false;).

This only happens when the dialog is set to modal.
This did not happen with jQuery 1.3.2 & jQueryUI 1.7.2


In the examples above, click the "Load Dialog" link then "Test Link 2". You will get an alert from the onclick event and also an alert from the href.


Richard Phipps

- example now attached.

Update 2:
- added example for newly released 1.8.2 and it still doesn't work :-(