Modal dialog window unable to send returnValue in Google Chrome

March 18th, 2011

Yesterday I noticed very odd behaviour in an editor interface using a javascript showModalDialog function.

After a lot of testing and pulling my hair, I came to the conclusion that it’s a bug in Google Chrome (tested in Chrome version 10) which cause the return value to be unreadable from the modal window, after a redirection of any kind (reload, post, etc) has occurred.

When the content of the modal window first loads, there’s no problem at all. After a post inside the window has been made, or for instance a change page link has been clicked, the connection to the parent window seems to be broken for ever and ever. The returnValue will be “undefined” until the window is closed and a new modal dialog has been opened.

I made a testpage to recreate this bug in Google Chrome, test it here:
modalDialogTest (opens in new tab/window)

Tags:

2 Responses to “Modal dialog window unable to send returnValue in Google Chrome”

  1. fanhang zhang says:

    I find the returnValue works well in host,but can not work on the local file system.

  2. Matt Robinson says:

    I’m getting this bug too :(

Leave a Reply