Closed
Bug 1358363
Opened 7 years ago
Closed 7 years ago
Update notification focuses another window
Categories
(Toolkit :: Application Update, defect, P1)
Tracking
()
VERIFIED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: Oriol, Assigned: alexical)
References
Details
Attachments
(2 files, 1 obsolete file)
It has happened multiple times that I'm in one window, the update notification appears and places another window at the top. To reproduce, 1. Open Firefox (1 window) 2. Open the browser console (Ctrl+Shift+J) 3. Open a new window 4. In the browser console, enter gMenuButtonUpdateBadge.showRestartNotification(false) Result: the old window is focused. So annoying.
Updated•7 years ago
|
Priority: -- → P1
Comment 2•7 years ago
|
||
I can't reproduce on OSX. Depending on your OS this should be either a dupe of bug 1352769 or bug 1339439 (from your description my guess it the former).
Reporter | ||
Comment 3•7 years ago
|
||
Yes, it seems bug 1352769. I don't usually get notifications, except the update ones. So bug 893505 makes this more noticeable.
Comment hidden (mozreview-request) |
Assignee | ||
Comment 5•7 years ago
|
||
I think the correct solution regardless of the underlying issue is to only show a badge until the window is focused. This has two benefits: - Ensure that the doorhanger entry animation is seen by the user, increasing the likelihood that they'll notice and take action. - If multiple windows are visible to the user, they will only see one doorhanger on the screen, which will ensure that a doorhanger isn't competing for attention with another instance of itself.
Assignee: nobody → dothayer
Flags: needinfo?(dothayer)
Comment 6•7 years ago
|
||
mozreview-review |
Comment on attachment 8860454 [details] Bug 1358363 - Show PanelUI notifications when window focused https://reviewboard.mozilla.org/r/132446/#review135464 I pushed this to oak to try it out and there are some test failures https://treeherder.mozilla.org/#/jobs?repo=oak&tochange=3d0af80058865bfa03581bad2547863d0a434203&fromchange=3d0af80058865bfa03581bad2547863d0a434203 How will this behave on OS X where the problem isn't present?
Attachment #8860454 -
Flags: review?(robert.strong.bugs) → review-
Comment 7•7 years ago
|
||
Doug, will this approach also fix bug 1355262?
Comment 8•7 years ago
|
||
Bram,heads up regarding this change. Please let us know if you are ok with it.
Flags: needinfo?(bram)
Comment 9•7 years ago
|
||
From what I understand, the proposed fix sounds great, but I also wasn’t able to reproduce the issue. Is there an example video I can see, or does it look practically the same as bug 1339439 attachment 8839405 [details]?
Flags: needinfo?(bram)
Comment 10•7 years ago
|
||
I don't think there is a video but it brings a browser window to the front when another window (e.g. browser console) is focused on Windows.
Reporter | ||
Comment 11•7 years ago
|
||
Adding a screen cast. The notification brings the old window above the newer one and above the browser console. The browser console remains focused, so clicking it does not bring it to the top. You need focus another window first.
Comment 12•7 years ago
|
||
(In reply to Oriol from comment #11) > Created attachment 8860776 [details] Thanks for the demo video, Oriol. It’s helped me understand the situation. (In reply to Doug Thayer [:dthayer] from comment #5) > I think the correct solution regardless of the underlying issue is to only > show a badge until the window is focused. This is the correct solution. Because the update doorhanger is not specific to a particular website (unlike a permission doorhanger), we shouldn’t pop it open on all tabs/windows. Just on the one, and more specifically, the one that the user has chosen to focus on.
Comment 13•7 years ago
|
||
I've also noticed that neither the doorhanger or the hamburger menu notification is displayed on any other Windows. So, if I have a notification in one window and I close that window then I no longer have anything on the hamburger menu to restart, etc.
Assignee | ||
Comment 14•7 years ago
|
||
(In reply to Robert Strong [:rstrong] (use needinfo to contact me) from comment #7) > Doug, will this approach also fix bug 1355262? It should, yes. Unfortunately I can't reproduce that one, but I don't see how it could happen with this change in place. (In reply to Robert Strong [:rstrong] (use needinfo to contact me) from comment #13) > I've also noticed that neither the doorhanger or the hamburger menu > notification is displayed on any other Windows. So, if I have a notification > in one window and I close that window then I no longer have anything on the > hamburger menu to restart, etc. How often have you run into this? Was there anything unusual about how you created the extra windows?
Comment 15•7 years ago
|
||
I observed same behavior at my end too, as mentioned in comment 13.
Comment 16•7 years ago
|
||
(In reply to Doug Thayer [:dthayer] from comment #14) > (In reply to Robert Strong [:rstrong] (use needinfo to contact me) from > comment #7) > > Doug, will this approach also fix bug 1355262? > > It should, yes. Unfortunately I can't reproduce that one, but I don't see > how it could happen with this change in place. > > (In reply to Robert Strong [:rstrong] (use needinfo to contact me) from > comment #13) > > I've also noticed that neither the doorhanger or the hamburger menu > > notification is displayed on any other Windows. So, if I have a notification > > in one window and I close that window then I no longer have anything on the > > hamburger menu to restart, etc. > > How often have you run into this? Was there anything unusual about how you > created the extra windows? I tried to reproduce this twice today without success and I'll keep trying. (In reply to Kanchan Kumari QA from comment #15) > I observed same behavior at my end too, as mentioned in comment 13. Can you reproduce and if so with what steps?
Comment 17•7 years ago
|
||
mozreview-review |
Comment on attachment 8860454 [details] Bug 1358363 - Show PanelUI notifications when window focused https://reviewboard.mozilla.org/r/132446/#review136348 ::: browser/components/customizableui/content/panelUI.js:66 (Diff revision 1) > Services.obs.addObserver(this, "fullscreen-nav-toolbox"); > Services.obs.addObserver(this, "panelUI-notification-main-action"); > Services.obs.addObserver(this, "panelUI-notification-dismissed"); > > window.addEventListener("fullscreen", this); > + window.addEventListener("focus", this); You should use the activate event for this.
Comment 18•7 years ago
|
||
(In reply to Robert Strong [:rstrong] (use needinfo to contact me) from comment #16) > (In reply to Kanchan Kumari QA from comment #15) > > I observed same behavior at my end too, as mentioned in comment 13. > Can you reproduce and if so with what steps? Not reproducible for me either today. I am getting menu badge and doorhanger UI in all the Fx open windows (refer to the following video). Last time when I encountered this issue (as mentioned in comment 13), menu badge or doorhanger UI was getting displayed in one of the open windows and when that same window got closed then there was no menu badge and doorhanger UI in any other opened Fx windows. I do see original reported issue in this bug i.e. Update notification focuses old window. Please see the video here: https://ranisharma22.tinytake.com/sf/MTU0NTEzM181MzQyNjM4
Comment 19•7 years ago
|
||
(In reply to Doug Thayer [:dthayer] from comment #14) > (In reply to Robert Strong [:rstrong] (use needinfo to contact me) from > comment #7) > > Doug, will this approach also fix bug 1355262? > > It should, yes. Unfortunately I can't reproduce that one, but I don't see > how it could happen with this change in place. > > (In reply to Robert Strong [:rstrong] (use needinfo to contact me) from > comment #13) > > I've also noticed that neither the doorhanger or the hamburger menu > > notification is displayed on any other Windows. So, if I have a notification > > in one window and I close that window then I no longer have anything on the > > hamburger menu to restart, etc. > > How often have you run into this? Was there anything unusual about how you > created the extra windows? I think what I saw was the badge wasn't shown in new windows. Just verified this is the case currently.
Comment hidden (mozreview-request) |
Assignee | ||
Comment 21•7 years ago
|
||
Updated the tests and changed to use the "activate" event rather than the "focus" event. I triggered a try, and it's not done yet but so far the issue with the previous patch hasn't manifested. https://treeherder.mozilla.org/#/jobs?repo=try&revision=3e40c5fb3dbb61ddb7e85b70b0ec179f627235a1
Comment 22•7 years ago
|
||
mozreview-review |
Comment on attachment 8860454 [details] Bug 1358363 - Show PanelUI notifications when window focused https://reviewboard.mozilla.org/r/132446/#review136550 Looks like the try push has failing tests as well as an eslint error https://treeherder.mozilla.org/#/jobs?repo=try&revision=3e40c5fb3dbb61ddb7e85b70b0ec179f627235a1&selectedJob=94247973
Attachment #8860454 -
Flags: review?(robert.strong.bugs)
Comment 23•7 years ago
|
||
(In reply to Robert Strong [:rstrong] (use needinfo to contact me) from comment #16) > Can you reproduce and if so with what steps? If I open a new window after hamburger menu badge/doorhanger displayed on existing Window then there is no menu badge on new opened window. Is this intended? Now if I close the window which has hamburger menu badge then there is nothing on hamburger menu on new window to restart. I also observed one time, not all opened windows get hamburger menu badge, Please refer to following STR: 1. Launch Nightly which has update. 2. Open about:config and make following changes: Change app.update.badgeWaitTime to 10 Change app.update.lastUpdateTime.background-update-timer to 1 Change app.update.promptWaitTime to 30 Change app.update.timerMinimumDelay to 10 3. Exit Firefox. 4. Launch Firefox and quickly open a couple of websites in seperate windows. 5. In approximately a minute or two the hamburger menu badge should be displayed. 6. In approximately 20 more seconds the doorhanger ui should be displayed. Observation: Out of three opened windows, only two windows get hamburger menu badge and doorhanger ui.
Comment 24•7 years ago
|
||
(In reply to Kanchan Kumari QA from comment #23) > (In reply to Robert Strong [:rstrong] (use needinfo to contact me) from > comment #16) > > > Can you reproduce and if so with what steps? > > If I open a new window after hamburger menu badge/doorhanger displayed on > existing Window then there is no menu badge on new opened window. Is this > intended? No and bug 1359733 has been filed for this.
Assignee | ||
Comment 25•7 years ago
|
||
I can't seem to make any real headway on this. It reliably fails on try, and yet I can't get it to fail on my own machine on OSX, Windows, or Linux. I added some logging on activation/deactivation events to diagnose [1], and something is deactivating the main window during the tests. rstrong, do you know of anything that might be causing this, or any gotchas around dealing with focus in tests? I tried to imitate some of the tests for PopupNotifications.jsm, since it also doesn't show doorhangers if the window isn't focused, but it doesn't seem to have the same problems, so I'm wondering if it's something in the update workflow causing it. 1: https://treeherder.mozilla.org/#/jobs?repo=try&revision=a053d4ec887d67b7aa93560c27440b87d98080b8
Flags: needinfo?(robert.strong.bugs)
Assignee | ||
Comment 26•7 years ago
|
||
I think I sorted it out. Cleaning up the patch and doing another try run before requesting further review though.
Flags: needinfo?(robert.strong.bugs)
Comment hidden (mozreview-request) |
Assignee | ||
Comment 28•7 years ago
|
||
Link to try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=9ffe7b50f8f87571e6bf1eeae1a17d0b67ee4e5a
Comment hidden (mozreview-request) |
Comment 30•7 years ago
|
||
mozreview-review |
Comment on attachment 8860454 [details] Bug 1358363 - Show PanelUI notifications when window focused https://reviewboard.mozilla.org/r/132446/#review141374
Attachment #8860454 -
Flags: review?(robert.strong.bugs) → review+
Comment 31•7 years ago
|
||
mozreview-review |
Comment on attachment 8860454 [details] Bug 1358363 - Show PanelUI notifications when window focused https://reviewboard.mozilla.org/r/132446/#review141376
Comment 32•7 years ago
|
||
mozreview-review |
Comment on attachment 8860454 [details] Bug 1358363 - Show PanelUI notifications when window focused https://reviewboard.mozilla.org/r/132446/#review141378
Comment 33•7 years ago
|
||
Pushed by rstrong@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/18f88f090a65 Update notification focuses another window. r=rstrong
Comment 34•7 years ago
|
||
There were some merge conflicts so I updated the patch Pushed to mozilla-inbound https://hg.mozilla.org/integration/mozilla-inbound/rev/18f88f090a65856b5ce746d6ec5766a7be23f44a
Attachment #8866591 -
Flags: review+
Comment 35•7 years ago
|
||
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/21380e8f9c9c for failures in browser/components/customizableui/test/browser_panelUINotifications.js like https://treeherder.mozilla.org/logviewer.html#?job_id=98216522&repo=mozilla-inbound
Comment 36•7 years ago
|
||
And, though it's tier-2, https://treeherder.mozilla.org/logviewer.html#?job_id=98215065&repo=mozilla-inbound
Comment 37•7 years ago
|
||
Comment on attachment 8866591 [details] [diff] [review] unbitrotted patch as landed on inbound Doug, if you could please update the patch to latest m-c, request review from me, and I'll land it via autoland after reviewing it. Thanks!
Attachment #8866591 -
Attachment is obsolete: true
Flags: needinfo?(dothayer)
Comment hidden (mozreview-request) |
Assignee | ||
Comment 39•7 years ago
|
||
Updated. Quick note: I reverted the change to UP_checkForUpdates because I believe it was unnecessary, and all that was important was the change to showUpdateElevationRequired. The UP_checkForUpdates change was what was causing test_update_wizard.py to fail.
Flags: needinfo?(dothayer)
Comment 40•7 years ago
|
||
Makes sense and thanks!
Comment 41•7 years ago
|
||
mozreview-review |
Comment on attachment 8860454 [details] Bug 1358363 - Show PanelUI notifications when window focused https://reviewboard.mozilla.org/r/132446/#review141446
Comment 42•7 years ago
|
||
Pushed by rstrong@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7a941136fcec Show PanelUI notifications when window focused r=rstrong
Comment 43•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7a941136fcec
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Comment 44•7 years ago
|
||
I tested this bug fix on nightly (Build ID 20170516122050) and found it to be working fine.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•