Open Bug 1258687 Opened 8 years ago Updated 11 months ago

PopupNotification icons don't appear in the urlbar until the window is focused

Categories

(Toolkit :: PopupNotifications and Notification Bars, defect, P3)

defect

Tracking

()

Tracking Status
firefox48 --- affected

People

(Reporter: arni2033, Unassigned)

References

Details

(Whiteboard: [fxprivacy])

Attachments

(3 files)

>>>   My Info:   Win7_64, Nightly 48, 32bit, ID 20160320030409
STR:
0. Make sure there's only 1 Firefox window.
1. Dock the window to the left side of screen (Win+Left). Open new tab.
2. Open new window, dock it to the right side of screen (Win+Right)
3. Focus the window from Step 1. Open Scratchpad/Console, execute the line:
> setTimeout(function(){location.href="https://bugzilla.mozilla.org/attachment.cgi?id=8675621"},3000)
4. In less than 3 seconds focus window from Step 2
5. Wait 3 seconds

AR:  Plug-in loaded in the window from Step 1, but there's no plug-in button in urlbar
ER:  Plugin button should appear in urlbar after Step 5
Component: Untriaged → Location Bar
Blocks: 880735
Component: Location Bar → Plug-ins
Product: Firefox → Core
If you then focus window 1, does the notification icon appear? ISTR somebody saying that this was the intended design of notification icons, but I can't recall why.
Flags: needinfo?(arni2033)
> If you then focus window 1, does the notification icon appear?
Yes, it appears. But there's a bug even with that (see STR_2, "reliable trap"). Also, STR_2 shows inconsistency in "showing all plugin-related stuff" as I'd call it. Bug 932854 and bug 880735 created this mess (though maybe even this breakage is intentional - I can't tell). My "bugs.txt" file was too huge, so I haven't mentioned STR_2 before. There're also corrected expectations.


STR_2 (reliable trap):
0. Open about:plugins, set Flash to "Ask to Activate"
1. Open new Firefox window, dock it to the left  side of screen (Win+Left)
2. Open new window, dock it to the right side of screen (Win+Right) so that 1st window was visible
3. Open attached "testcase 1" in the window from Step 1
4. In less than 5 seconds, doubleclick on the page from Step 3, then focus window from Step 2
5. Wait 5 seconds until Flash plugin notification appears in the window from Step 1 (sic)
6. Click on identity block in the window from Step 1
  (hold left mouse button, wait 500ms, release left mouse button)

AR:
 Step 5 - Flash plugin notification appears below urlbar. Flash doorhanger doesn't appear in urlbar
 Step 6 - Flash plugin doorhanger appears in urlbar and nothing else happens

ER:  Either X or X+Y
 X) Step 5 - Flash plugin doorhanger should appear in urlbar
 Y) Step 6 - Identity popup should open
 I know that it's possible for plugin doorhanger to appear 0.1s before user clicks anyway, but
 that's "random" trap, while STR_2 is "reliable" trap for user. Just look at it, Flash plugin
 notification appears in Step 5, and doorhanger does not. The browser is clearly broken in some way.
Blocks: 932854
Flags: needinfo?(arni2033)
NI?bram to specify how this should actually work.
Flags: needinfo?(bram)
Priority: -- → P3
(In reply to Benjamin Smedberg  [:bsmedberg] from comment #2)
> If you then focus window 1, does the notification icon appear? ISTR somebody
> saying that this was the intended design of notification icons, but I can't
> recall why.

I would also like to know why the Plugin icon only appear when you re-focus on an inactive window. There must be a good reason why it doesn’t show up automatically and needed a re-focus to trigger.



(In reply to arni2033 from comment #5)
> ER:  Either X or X+Y
>  X) Step 5 - Flash plugin doorhanger should appear in urlbar
>  Y) Step 6 - Identity popup should open
>  I know that it's possible for plugin doorhanger to appear 0.1s before user
> clicks anyway, but
>  that's "random" trap, while STR_2 is "reliable" trap for user. Just look at
> it, Flash plugin
>  notification appears in Step 5, and doorhanger does not. The browser is
> clearly broken in some way.

This is an interesting use case.

The problem with showing doorhanger automatically is that it’s too easily dismissable.

Let’s say that we decide to show the doorhanger dialogue on the inactive window. As a user, I can either:

1. Click anywhere on the inactive window to make it active. But as soon as I click it, the doorhanger disappears!
2. Click the doorhanger itself, or a button in the doorhanger. The doorhanger doesn’t disappear and I can now enable the plugin.

Because a user is likely to click the window itself to make it active, instead of aiming her mouse inside a fairly small doorhanger dialogue, the doorhanger has a large chance of being dismissed. This leads to confusion (“I want to activate Flash, but that dialogue is now gone. How do I activate it again?”) and the user needing to hunt for the right Plugin icon to re-show it.

This is why showing a persistent notification below the URL bar is necessary. With this approach, when you re-focus on the window, the notification is still there, waiting for you to activate it.

But I agree with OP’s suggestion on comment 0. The Plugin icon should always appear on the URL bar, even when the window is currently inactive. This means that the URL bar icon won’t move around suddenly. And if you happen to click on the identity block area, it won’t move so suddenly, and you won’t get a false click target that doesn’t work.

Does this help?
Flags: needinfo?(bram)
The bug I was thinking of is bug 881331 which we supposedly fixed. Dolske can your team take this?
Flags: needinfo?(dolske)
Panos' team is working on notifications.
Flags: needinfo?(dolske) → needinfo?(past)
Adding it to the team triage list. Since this does not look like a recent regression, my proposal is to make this a P3.
Flags: needinfo?(past)
Whiteboard: [fxprivacy][triage]
Is this bug specific to the plugin icon, or can this also be reproduced with the camera icon (eg. when an https page with persistent camera permission requests the camera while the page is in a window that isn't focused)?

Asking this mostly because I'm wondering if this is a generic PopupNotifications bug, or something specific to the plugin panel (that will likely be redesigned/replaced in the not so distant future).
Keywords: qawanted
According with my investigations, this issue is not specific to the plugins icon but also affects other icons (camera and audio), here are the steps that I used for testing:

1. Launch Nightly
2. Navigate to the User Media demo and leave this tab in focus:
https://webrtc.github.io/samples/src/content/getusermedia/gum/
3. Open the Scratchpad: click on Execute menu -> and select Reload and Run 
4. Click on the demo opened in step 2
5. Navigate to the Audio demo and leave this tab in focus:
https://webrtc.github.io/samples/src/content/getusermedia/audio/
6. Open the Scratchpad: click on Execute menu -> and select Reload and Run 
7. Click on the demo opened in step 5

Actual results:
In step 3 and 5 the icons (camera and audio) are not displayed until the tab where the demos are opened in, get focus. 

On the plugins side, I investigated a little more and I can reproduce the issue ever since the Plugins icon and the corresponding doorhanger were introduced in Firefox 24. 

Please let me know if there is anything else that I can do.
Keywords: qawanted
Whiteboard: [fxprivacy][triage] → [fxprivacy]
Summary: Plugin button in urlbar doesn't appear if window isn't focused → PopupNotification icons don't appear in the urlbar until the window is focused
Florian, does it make sense for this to stay in the plugins component?
Flags: needinfo?(florian)
No, it's not plugin specific.
Component: Plug-ins → Notifications and Alerts
Flags: needinfo?(florian)
Product: Core → Toolkit
Severity: normal → S3
Component: Notifications and Alerts → PopupNotifications and Notification Bars
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: