Popup notification goes unnoticed in unfocused windows

RESOLVED FIXED in mozilla24

Status

()

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: vlad, Assigned: dao)

Tracking

unspecified
mozilla24
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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.
(Assignee)

Comment 1

5 years ago
We should probably call window.getAttention?
Blocks: 398776
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?
(Assignee)

Comment 3

5 years ago
(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.
(Assignee)

Updated

5 years ago
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
(Assignee)

Comment 6

5 years ago
Created attachment 754735 [details] [diff] [review]
patch
Assignee: nobody → dao
Status: NEW → ASSIGNED
Attachment #754735 - Flags: review?(gavin.sharp)
(Assignee)

Updated

5 years ago
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
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
(Assignee)

Updated

5 years ago
Depends on: 882188
You need to log in before you can comment on or make changes to this bug.