Closed
Bug 711624
Opened 14 years ago
Closed 13 years ago
JS prompt dialog will appear in the foreground when loading the page with the code in the background
Categories
(Firefox for Android Graveyard :: General, defect, P3)
Tracking
(firefox15 verified, blocking-fennec1.0 +, fennec11+)
VERIFIED
FIXED
Firefox 13
People
(Reporter: nhirata, Assigned: Margaret)
References
()
Details
Attachments
(1 file)
5.45 KB,
patch
|
wesj
:
review+
|
Details | Diff | Splinter Review |
1. go to http://people.mozilla.com/~nhirata/html_tp
2. long tap on PasswordPrompt.html
3. select Open Link in New Tab
Expected: dialog will appear after you switch to the tab
Actual: dialog appears in the current tab.
Comment 1•14 years ago
|
||
Since our JS prompt dialogs are not tab modal, we'll need to bring the page that spawned the dialog to the front.
Updated•14 years ago
|
Priority: -- → P3
Updated•14 years ago
|
tracking-fennec: --- → 11+
![]() |
Reporter | |
Updated•13 years ago
|
blocking-fennec1.0: --- → ?
Updated•13 years ago
|
blocking-fennec1.0: ? → +
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → margaret.leibovic
Assignee | ||
Comment 2•13 years ago
|
||
I basically just copied what desktop does:
http://mxr.mozilla.org/mozilla-central/source/toolkit/components/prompts/src/nsPrompter.js#415
http://mxr.mozilla.org/mozilla-central/source/browser/base/content/tabbrowser.xml#2653
I also added a small optimization to selectTab to avoid sending unnecessary messages.
Attachment #603164 -
Flags: review?(wjohnston)
Assignee | ||
Comment 3•13 years ago
|
||
Also, we should file a follow-up to get rid of the dead code in PromptService.js!
Comment 4•13 years ago
|
||
Comment on attachment 603164 [details] [diff] [review]
patch
Review of attachment 603164 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good!
::: mobile/android/chrome/content/browser.js
@@ +1889,5 @@
> +
> + // We're about to open a modal dialog, make sure the opening
> + // tab is brought to the front.
> + let tab = BrowserApp.getTabForWindow(aEvent.target.top);
> + BrowserApp.selectTab(tab);
I think because you're registered on the browser element, we should never receive this event when we can't get a tab here? I'm a bit worried about it, but I'm willing to give this a go and add in the check later if we determine we need it.
::: mobile/android/components/PromptService.js
@@ +772,5 @@
> let data = Cc["@mozilla.org/android/bridge;1"].getService(Ci.nsIAndroidBridge).handleGeckoMessage(JSON.stringify({ gecko: aMsg }));
> return JSON.parse(data);
> + },
> +
> + fireDialogEvent: function(domWin, eventName) {
aDOMWin and aEventName
Attachment #603164 -
Flags: review?(wjohnston) → review+
Assignee | ||
Comment 5•13 years ago
|
||
Comment 6•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 13
Comment 7•13 years ago
|
||
Everything works as expected on the latest Nightly. Closing bug as Verified Fixed
--
Firefox 15.0a1 (2012-05-21)
Device: Galaxy Nexus
OS: Android 4.0.2
Status: RESOLVED → VERIFIED
status-firefox15:
--- → verified
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•