notification prompts do not work well across tabs or when opening a new tab

RESOLVED WONTFIX

Status

Fennec Graveyard
General
RESOLVED WONTFIX
8 years ago
7 years ago

People

(Reporter: jmaher, Assigned: vingtetun)

Tracking

Fennec 1.1
ARM
Maemo

Details

Attachments

(1 attachment)

(Reporter)

Description

8 years ago
in running through the litmus test cases, I found that geolocation is not working at all for n810 or n900.  It does work in Firefox on my desktop.

When I load a webpage:
http://people.mozilla.org/~jmaher/wifi.html

I don't get a share/don't share notification prompt.  Nor, does it load anything (in the case that it cached the info).  I tried this on my n810 with a fresh profile with no luck.
(Reporter)

Comment 1

8 years ago
aakash, can you verify on your end?
tracking-fennec: --- → ?
(Reporter)

Comment 2

8 years ago
ok, this is wonky, so I am running litmus on device and using CTRL+click to open in a new tab.  I wait and switch tabs, no prompt.  I switch back to the litmus tab and I see the notification.  In one case the notification was panned up a bit and I could not get it back until I panned to the top of the page.
(Reporter)

Comment 3

8 years ago
this is the case for offline storage as well.  Also I verified that this same confusion happens when reloading a page in a  current tab that the notification prompt will be in the previous tab.  The notification doesn't show up until you switch back to the other tab...weird!
Sounds like a problem with transient notifications. You might want to update the bug title when you get a better pattern.
(Reporter)

Updated

8 years ago
Summary: geolocation is not working in latest nightly builds on n810 and n900 → notification prompts do not work well across tabs or when opening a new tab
The problem here is because when a notification is throw we assume that it belong to the current active tab (http://mxr.mozilla.org/mobile-browser/source/chrome/content/notification.xml#40)

I'm thinking of it but i'm not sure of what to do for now since the notification didn't inform us of it's owner browser.
Maybe we should replace the simple Event (http://mxr.mozilla.org/mozilla-central/source/toolkit/content/widgets/notification.xml#133) by a UIEvent to attached a view to the event?

But this solution will probably block 1.9.2
so what are the steps to reproduce here?  I go to the wifi.html page you linked to and things seem to work as expected.  When I ctrl+click the link from this bug, I get the notification saying that people.mozilla.org wants my location.  

Would you expect us to not show that notification until I switched to the tab with wifi.html loaded?
(Reporter)

Comment 8

8 years ago
1) load this bug in fennec
2) ctrl+click to open wifi.html
3) switch tabs to view the geolocation page
4) wait a couple minutes for it to load...see nothing
5) hit refresh, nothing
6) switch back to the original tab and see the request to send geolocation
(In reply to comment #7)
> so what are the steps to reproduce here?  I go to the wifi.html page you linked
> to and things seem to work as expected.  When I ctrl+click the link from this
> bug, I get the notification saying that people.mozilla.org wants my location.  
> 
> Would you expect us to not show that notification until I switched to the tab
> with wifi.html loaded?

The problem here is that the notification is fired in the wrong window. Compare to firefox we use only one notificationbox for every browser, when they use one box per browser.

So yes, i guess it is what he expects
Created attachment 423812 [details] [diff] [review]
Patch

This patch does not modify the platform code, because after looking it more,modifying what I've suggested previously is unuseful.

This patch create a kind of wrapper for the notification box, where "appendNotification" is hooked to a specific method for a specific tab.
If someone know a better method for wrapping the node I'll be happy to go with it.
Assignee: nobody → 21
Attachment #423812 - Flags: review?(mark.finkle)

Updated

8 years ago
Component: Linux/Maemo → General

Updated

7 years ago
tracking-fennec: ? → 2.0+
Now that we are using real browsers, let's fix bug 598331 and close this bug.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → WONTFIX
Attachment #423812 - Flags: review?(mark.finkle)
You need to log in before you can comment on or make changes to this bug.