RESOLVED INVALID 18121
Call to alert() fails after calling showModalDialog()
https://bugs.webkit.org/show_bug.cgi?id=18121
Summary Call to alert() fails after calling showModalDialog()
Robbie Paplin
Reported 2008-03-26 12:39:47 PDT
If you call showModalDialog on a calling page, the window.returnvalue value that you set on the dialog page doesn't get passed back to the calling page. See the attached files for an example.
Attachments
Page that calls showModalDialog (2.16 KB, text/html)
2008-03-26 12:42 PDT, Robbie Paplin
no flags
Page called by showModalDialog (the dialog) (1.46 KB, text/html)
2008-03-26 12:51 PDT, Robbie Paplin
no flags
Page that calls showModalDialog (using Bugzilla url) (2.19 KB, text/html)
2008-03-26 13:01 PDT, Robbie Paplin
no flags
Testcase that doesn't use alert() to display the return value (2.34 KB, text/html)
2008-03-27 19:48 PDT, Adam Roben (:aroben)
no flags
Robbie Paplin
Comment 1 2008-03-26 12:42:01 PDT
Created attachment 20093 [details] Page that calls showModalDialog This page depends on the BrowserPicker.html attachment to be in the same directory.
Robbie Paplin
Comment 2 2008-03-26 12:51:56 PDT
Created attachment 20094 [details] Page called by showModalDialog (the dialog) This page depends upon the DialogTest.html file previosly attached
Robbie Paplin
Comment 3 2008-03-26 13:01:26 PDT
Created attachment 20095 [details] Page that calls showModalDialog (using Bugzilla url) Replaced (browerpicker.html) parameter in showModalDialog call w/ bugzilla attachment url (http://bugs.webkit.org/attachment.cgi?id=20094), so you can test on the bugzilla site.
Vicki Murley
Comment 4 2008-03-26 15:19:34 PDT
Note that this bug is Windows-only.
Vicki Murley
Comment 5 2008-03-27 10:00:40 PDT
Mark Rowe (bdash)
Comment 6 2008-03-27 19:19:00 PDT
Verified in Safari 3.1 that this works ok on the Mac.
Adam Roben (:aroben)
Comment 7 2008-03-27 19:40:38 PDT
After a little debugging, this is definitely a Safari issue, not a WebKit issue. <rdar://5825338> will continue to track this issue. Thanks for filing the bug report!
Adam Roben (:aroben)
Comment 8 2008-03-27 19:47:19 PDT
Here's a little more detail about what I discovered: The return value from showModalDialog is getting passed back to the calling script. The call to alert() is what's failing in some cases. Scripts relying on showModalDialog should be able to get the return value. <rdar://5825338> will track the problematic interaction between showModalDialog() and alert().
Adam Roben (:aroben)
Comment 9 2008-03-27 19:48:03 PDT
Created attachment 20143 [details] Testcase that doesn't use alert() to display the return value Here's a testcase that proves the return value from showModalDialog is getting returned to the calling script. Instead of calling alert() we insert the value into the page.
Note You need to log in before you can comment on or make changes to this bug.