Closed Bug 747023 Opened 11 years ago Closed 11 years ago

Install software notification doorhanger popup can appear from page in background tab

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(firefox14 verified, firefox15 verified, blocking-fennec1.0 +)

VERIFIED FIXED
Firefox 15
Tracking Status
firefox14 --- verified
firefox15 --- verified
blocking-fennec1.0 --- +

People

(Reporter: martijn.martijn, Assigned: Margaret)

Details

(Keywords: testcase)

Attachments

(1 file, 1 obsolete file)

Steps to reproduce:
- Long tap on this link and open in new tab: http://people.mozilla.org/~mwargers/tests/dom/multiple_doorhangers.htm

Expected result:
- No notification doorhanger appears

Actual result:
- Install software notification doorhanger appears

Tested on the Samsung Galaxy Nexus, Android4.0.
blocking-fennec1.0: --- → ?
Reproduced (04/30)
Assignee: nobody → margaret.leibovic
blocking-fennec1.0: ? → +
Attached patch patch (obsolete) — Splinter Review
Problem here is that we aren't passing a tab id to doorhanger.show(), so it's just picking the current one. This patch just ports over logic from desktop:
http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js#715

(Desktop uses a browser to keep track of doorhangers, we use a tab)
Attachment #619732 - Flags: review?(mark.finkle)
Comment on attachment 619732 [details] [diff] [review]
patch

I assume that we couldn't do something like:

+        let win = installInfo.originatingWindow;
+        let tab = BrowserApp.getTabForWindow(win.top);

If not, I am fine with the docShell based code
Attachment #619732 - Flags: review?(mark.finkle) → review+
Attached patch simpler patchSplinter Review
(In reply to Mark Finkle (:mfinkle) from comment #3)

> I assume that we couldn't do something like:
> 
> +        let win = installInfo.originatingWindow;
> +        let tab = BrowserApp.getTabForWindow(win.top);

Yeah, this works. I looked into why desktop does this docShell business, and that was added way long ago (2004) before there was an installInfo interface.
Attachment #619732 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/281574985410
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 15
Comment on attachment 619961 [details] [diff] [review]
simpler patch

[Approval Request Comment]
Regression caused by (bug #): n/a
User impact if declined: add-on install doorhanger can appear in wrong tab
Testing completed (on m-c, etc.): just landed on m-c
Risk to taking this patch (and alternatives if risky): low risk, only affects add-on install doorhaner
String changes made by this patch: n/a
Attachment #619961 - Flags: approval-mozilla-aurora?
Attachment #619961 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Verified/Fixed on:
Nightly Fennec 15.0a1 (2012-05-30)
Aurora Fennec 14.0a2 (2012-05-30)
Devices: HTC Desire Z (Android 2.3.3)

Verified using the STR from comment 0.
Status: RESOLVED → VERIFIED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.