WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
29459
showModalDialog does not work when launched from a modal window
https://bugs.webkit.org/show_bug.cgi?id=29459
Summary
showModalDialog does not work when launched from a modal window
Craig
Reported
2009-09-18 08:12:13 PDT
When launching a modal dialog (using showModalDialog(...)) from a modal window (that was created with showModalDialog) it does not work properly. When you click on the second modal window, it goes behind the first modal window. It appears to be parenting to the original html page, the one that launched the first modal dialog and not parenting to the modal window that launched it. BTW - We are using Safari 4.0.2 (530.19.1) on Windows platforms (Vista, XP). We are making our IE-based application compatible with Macs. Our application makes extensive use of modal dialogs. Thank you for your time. -Craig.
Attachments
reduction
(304 bytes, text/html)
2011-01-08 21:08 PST
,
Darth
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2009-09-20 20:52:39 PDT
Thanks for the report! Do you happen have a test case that shows the issue? A reduced test case would be best, but a link to a live Web page with your product would work, as well.
Darth
Comment 2
2011-01-08 21:08:06 PST
One can test this easily with the following code <!doctype html> <html> <head> <script> function openModal() { var mod = window.showModalDialog("test.html"); // JS execution should lock out till above window is closed. } </script> </head> <body> <button type='button' onclick='openModal();'>Click me</button> </body> </html> In Safari: 1] Click the button to launch a window. 2] Observe you cannot do anything on the parent, everything is suppressed and modal window has full focus even when you go to another application and come back. (Note that modal window locks out other tabs too which is undesirable and probably why Chrome hasn't implemented this locking out.) 3] Move this child to the side and click the button on it. 4] Observe this new child doesn't suppress its opener window and you can still push the button on the opener window that should be suppressed. Also focus can switch between the 2 child windows. Chrome has more issues that safari and one needs to rely on stuff like
http://code.google.com/p/chromium/issues/detail?id=16045#c28
Darth
Comment 3
2011-01-08 21:08:50 PST
Created
attachment 78340
[details]
reduction
chris reiss
Comment 4
2011-02-18 13:04:56 PST
doesn't reproduce on the QtTestBrowser, safari specific ?
Darth
Comment 5
2011-02-18 17:41:09 PST
yep, afaik. Safari implementation/design as to how modal popups work. Btw, my test link seems broken since it references itself in the modal. Best way to test it is to use the code snippet in
comment 2
and save it locally as test.html
Ahmad Saleem
Comment 6
2022-07-31 02:27:22 PDT
showModalDialog support is gone from other browser and recently from Webkit Github source as well:
https://github.com/WebKit/WebKit/commit/c4bb4d1af89e1ef5f57ef1b1cf7b65ce62c30ba5
Do we need to work on this? Thanks!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug