Double Click of Death (Async Command control which toggles Modal Dialog freezes browser window)

With MWS 8.2, I noticed a strange behavior with an Async Command Link that toggles a Modal Dialog.

When clicked once it works just fine, opening the Modal Dialog and disabling the rest of the browser window. The Modal Dialog can then be toggled off again and the browser window is being enabled.

With a double click however, the Modal Dialog is opened and instantly closed again, leaving the user with the disabled browser window.

This was noticed before in this post, but unfortunately not solved for Async Command controls: [url]http://tech.forums.softwareag.com/techjforum/posts/list/24194.page[/url]

I attached an example Designer project with a simple portlet that shows this behavior. After deploying it to MWS you can access the portlet via this URL: [url]http://localhost:8585/portlet/doubleclickofdeath___foo[/url]

I found two solutions, but dislike both of them. I have a big project here that shows this problem in a lot of places and I want to find the best solution before applying it.

  • Overkill: Refreshing the whole portlet instead of just the modal dialog.
  • Obscure: Use javascript onclick handler with show() instead of toggle.

Any ideas?
DoubleClickOfDeath.zip (12.8 KB)