Closed Bug 876394 Opened 11 years ago Closed 11 years ago

Popup notification goes unnoticed in unfocused windows

Categories

(Toolkit :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: vlad, Assigned: dao)

References

Details

Attachments

(1 file)

If a web app does something that requires a synchronous doorhanger notification (e.g. asking to store more than 50MB in IndexedDB), the doorhanger won't appear until Firefox has focus again.  There is no indication that Firefox is waiting for any kind of user input, so if you happen to be in a different window, you won't notice that you actually need to do anything.. and whatever you're waiting for may just be hung.

(This might not be only with synchronous notifications, but that's the easiest to reproduce.)

STR (in a clean profile -- assuming you have never stored the data from this site before):

1) Go to www.unrealengine.com/html5
2) Click Play
3) Focus another window

After a few minutes, when it finishes downloading, Firefox will appear to just sit there.. but if you click back in the Firefox window, the doorhanger will appear.
We should probably call window.getAttention?
Blocks: doorhanger
Yeah, at the very least.. that's probably the easiest way to make this better with no UI impact, though it's not a full solution I don't think.  Is there any reason why we can't call window.getAttention *and* show the doorhanger at the same time, even if the window doesn't have focus?  Though I think the doorhanger goes away if you click outside of it, so maybe that's the reason?
(In reply to Vladimir Vukicevic [:vlad] [:vladv] from comment #2)
> Is
> there any reason why we can't call window.getAttention *and* show the
> doorhanger at the same time, even if the window doesn't have focus?  Though
> I think the doorhanger goes away if you click outside of it, so maybe that's
> the reason?

Yeah, the popup wouldn't be anchored anywhere and the dismissal behavior would be unclear.
We could/should still anchor it to the URL bar icon.. for dismissal behaviour, would be tricky, but maybe we could do something like not dismissing on a click that the browser gains focus on, and only dismissing if there's a click with the browser focused?  (So one click to focus, and then another click to dismiss)
I think that would be too complicated to implement, and the idea of a popup appearing for a non-focused window seems weird in general. Seems to me that just calling getAttention in these cases would address this problem adequately.
Component: Location Bar → General
OS: Windows 8 → All
Product: Firefox → Toolkit
Hardware: x86_64 → All
Summary: Doorhanger doesn't appear unless window has focus → Doorhanger goes unnoticed in unfocused windows
Attached patch patchSplinter Review
Assignee: nobody → dao
Status: NEW → ASSIGNED
Attachment #754735 - Flags: review?(gavin.sharp)
Summary: Doorhanger goes unnoticed in unfocused windows → Popup notification goes unnoticed in unfocused windows
Attachment #754735 - Flags: review?(gavin.sharp) → review+
https://hg.mozilla.org/mozilla-central/rev/6a090a8a7684
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Depends on: 882188
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: