Closed Bug 735237 Opened 9 years ago Closed 9 years ago
.show Modal Dialog causes weird issues
See url testcase, steps to reproduce: - Tap on the window showModalDialog() button (second to last button) Expected result: - A new window opens with that page, which has an input a 'Close' button, a link and some text in it. Actual result: - The page seems to get opened in the same window, it's completely zoomed in, so that nothing is visible. Tapping on the Android back button doesn't seem to go back to the previous page.
Assignee: nobody → mbrubeck
blocking-fennec1.0: ? → +
Note: XUL Fennec throws an exception (NS_ERROR_FAILURE in nsIDOMWindow.showModalDialog) and fails to open a window. It's not clear how we could/should support modal content windows in Fennec. Proper support would require that we freeze content in the main window and prevent the user from interacting with it until the modal page is dismissed. Unless we have a good UX design, it's probably best to throw an exception like XUL Fennec. For comparison, none of the main competing browsers handle showModalDialog correctly: * Opera Mobile does not open the URL, but displays a dialog with just an "OK" button. * Stock Android Browser does not open the URL, but displays a dialog with the text "undefined" (in both Android 2.3 and 4.0) * Chrome opens the URL in a new tab but the tab is not modal (on both Android and desktop).
This patch makes window.showModalDialog throw an exception in fennec. Johnny, do you think this is the best approach and implementation? I'd also like to do basically the same thing for window.print in bug 739038.
Oops, accidentally uploaded an empty file. (Thanks, Margaret.)
Comment on attachment 614202 [details] [diff] [review] patch This makes sense to me until we have the UX bandwidth to figure out exactly how this should work on a mobile device, if at all.
Attachment #614202 - Flags: feedback?(jst) → feedback+
Try run for e9b15bc58060 is complete. Detailed breakdown of the results available here: https://tbpl.mozilla.org/?tree=Try&rev=e9b15bc58060 Results (out of 55 total builds): success: 48 warnings: 6 failure: 1 Builds (or logs if builds failed) available at: http://email@example.com
Same as the previous patch but adds a simple mochitest.
Status: NEW → ASSIGNED
Target Milestone: --- → Firefox 14
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.