[Ubuntu] Notifications steal focus and show up in the task bar
Categories
(Toolkit :: Alerts Service, defect)
Tracking
()
People
(Reporter: oardelean, Unassigned, NeedInfo)
References
Details
Attachments
(3 files)
Notes
- This is a follow-up from bug 1878037.
Found in
- Firefox Nightly 125.0a1;
Affected versions
- Firefox Nightly 125.0a1;
- Firefox 124.0b5;
Tested platforms
- Windows 10;
- macOS 12;
- Ubuntu 22;
Affected platforms
- Ubuntu 22;
Unaffected platforms
- Windows 10;
- macOS 12;
Steps to reproduce
- Launch Firefox.
- Navigate to about:config and change alerts.useSystemBackend to false.
- Restart the browser.
- Go to https://www.bennish.net/web-notifications.html
- Click on ‘Authorise’ to allow notifications.
- Click on ‘Show’ multiple times.
Expected result
- Notifications are not opened in the taskbar.
Actual result
- Notifications are opened in the taskbar.
Regression range
- mozregression points to:
- last good: 2022-01-18
- first bad : 2022-01-19
- pushlog: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=192e73e7c91313c09603efd1650931b917746bf4&tochange=cc33400f0ff80f0eada6c3aa637f37d247a3ff46
Comment 1•9 months ago
•
|
||
That range includes bug 1749174, which makes me believe it's been like this forever on Wayland.
Edit: Can't reproduce on Steam Deck 👀
Comment 2•8 months ago
|
||
I am also experiencing this with 124.0 (rc1) on FreeBSD 14 under X11.
Comment 3•8 months ago
|
||
Reproducible on versions 123, 124.0.1, 125.0b3, 126.0a1 with X11 (Gnome, Ubuntu). It's a regression, things worked before I upgraded to 123 but I can't confirm known good version. When things worked, the notifications were semi-transparent (visually), they'd turn more transparent when hovered and didn't receive events. Now they're opaque windows. Same symptoms as https://bugzilla.mozilla.org/show_bug.cgi?id=1878037 but the expected fix didn't work.
Same effect with alerts.useSystemBackend
true and false.
Comment 4•8 months ago
|
||
Hi Sean and Andrzej, can you try pip install mozregression
and mozregression --good (your last good date YYYY-MM-DD) --bad (today)
and post the result here?
I have just updated to 124.0.1 on Arch, and have noticed that Firefox notifications steal focus from other Firefox window inputs, but not to other applications. My alerts.useSystemBackend
is set to true
. I was previously on 120.0.1 which did not have this behaviour.
I haven't seen any taskbar windows, but I use tint2 so I'm not sure if I should or not!
With mozregression I can't get the nightly it offers from December to reliably show notifications- sometimes they don't seem to appear at all, sometimes I get an odd rectangle where the notification should be, but it's not rendered properly (has other screen data; I can't seem to upload a screenshot)
Comment 7•8 months ago
|
||
I haven't had time to try the bisect yet but pretty sure the bad commit is the same one that causes bug 1878037.
Let me chip in my two cents. Potentially, the notification exit could be considered a security problem, as it is possible to set the text of the messages and display the message in other sources. I have attached a screenshot, but for security reasons, I will leave the concept outside the frame, it is not difficult to reproduce.
Should I open a new security report or will a future patch fix the situation?
Comment 10•8 months ago
|
||
Pretty sure Emilio has better thought, who is surprisingly not in CC list 👀
Comment 11•8 months ago
|
||
Wait why did it close the bug...
Comment 12•8 months ago
|
||
On Wayland there's not much we can do about this. On X11 this should be fixed by bug 1882033 which should be fixed in 125. Can someone confirm that on a beta / nightly build comment 0 doesn't reproduce?
(In reply to Rob H from comment #6)
I have just updated to 124.0.1 on Arch, and have noticed that Firefox notifications steal focus from other Firefox window inputs, but not to other applications. My
alerts.useSystemBackend
is set totrue
. I was previously on 120.0.1 which did not have this behaviour.
You should install libnotify, that'd give your DE better notification controls, you're seeing the non-native notifications because we can't use libnotify on your system.
Comment 13•8 months ago
|
||
(In reply to Raphael from comment #8)
Let me chip in my two cents. Potentially, the notification exit could be considered a security problem, as it is possible to set the text of the messages and display the message in other sources. I have attached a screenshot, but for security reasons, I will leave the concept outside the frame, it is not difficult to reproduce.
That seems completely unrelated to this (those are not notifications, but form validation popups). Please file a new bug with steps to reproduce / a test-case?
Comment 14•8 months ago
|
||
Notifications with xfce4-notifyd: Arch repo Firefox 124.0.1 vs nightly Firefox 122.0a1
Comment 15•8 months ago
|
||
We really want current nightly (126)
Comment 16•8 months ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #12)
On Wayland there's not much we can do about this. On X11 this should be fixed by bug 1882033 which should be fixed in 125. Can someone confirm that on a beta / nightly build comment 0 doesn't reproduce?
I can confirm it is fixed in the 126.0.a1 nightly (mozregression --launch 2024-04-02
) and 125 (``--find-fix`)
(In reply to Rob H from comment #6)
I have just updated to 124.0.1 on Arch, and have noticed that Firefox notifications steal focus from other Firefox window inputs, but not to other applications. My
alerts.useSystemBackend
is set totrue
. I was previously on 120.0.1 which did not have this behaviour.You should install libnotify, that'd give your DE better notification controls, you're seeing the non-native notifications because we can't use libnotify on your system.
Thank you for the tip, though I have libnotify installed along with xfce4-notifyd. Notifications work fine with Firefox itself, just not the nightly 122.0a1; however- 126.0a1 displays correctly! Must have been something about the earlier build.
Comment 17•8 months ago
|
||
(In reply to Rob H from comment #16)
(In reply to Emilio Cobos Álvarez (:emilio) from comment #12)
On Wayland there's not much we can do about this. On X11 this should be fixed by bug 1882033 which should be fixed in 125. Can someone confirm that on a beta / nightly build comment 0 doesn't reproduce?
I can confirm it is fixed in the 126.0.a1 nightly (
mozregression --launch 2024-04-02
) and 125 (``--find-fix`)
FWIW, --find-fix
narrowed it down to what you probably already know, your change fixed the focus stealing for me:
7:47.44 INFO: Launching /tmp/tmp9dvl3bz2/firefox/firefox
7:47.44 INFO: Application command: /tmp/tmp9dvl3bz2/firefox/firefox -profile /tmp/tmp76vqgbe9.mozrunner
7:47.45 INFO: application_buildid: 20240227190618
7:47.45 INFO: application_changeset: f8c2d8a8b39bc557469364a31cbe575fb042da26
7:47.45 INFO: application_name: Firefox
7:47.45 INFO: application_repository: https://hg.mozilla.org/integration/autoland
7:47.45 INFO: application_version: 125.0a1
Was this integration build good, bad, or broken? (type 'good', 'bad', 'skip', 'retry', 'back' or 'exit' and press Enter): good
8:03.07 INFO: Narrowed integration fix window from [149f61ee, bc25e953] (4 builds) to [149f61ee, f8c2d8a8] (2 builds) (~1 steps left)
8:03.07 INFO: No more integration revisions, bisection finished.
8:03.07 INFO: First good revision: f8c2d8a8b39bc557469364a31cbe575fb042da26
8:03.07 INFO: Last bad revision: 149f61eecb69d6cf570be79260785c5b4a42e516
8:03.07 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=149f61eecb69d6cf570be79260785c5b4a42e516&tochange=f8c2d8a8b39bc557469364a31cbe575fb042da26
https://hg.mozilla.org/mozilla-central/log?rev=f8c2d8a8b39bc557469364a31cbe575fb042da26
Cheers and good work!
Comment 18•8 months ago
|
||
I created a new bug report(bug 1889381), I believe it should be a security issue. I have added you to the CC list. Please take a look at it, do your patches cover this bug?
Comment 19•7 months ago
|
||
I'm now running Nightly 2024-04-05 (Ubuntu snap 4108) and still see this issue with and without alert.useSystemBackend.
Comment 20•7 months ago
|
||
I cannot replicate with regular nightly (mozregression --launch 2024-04-05
→ INFO: application_version: 126.0a1
).
Versions prior to f8c2d8a8 would lose input if a notification (eg from bennish) was shown when typing in Firefox's address bar (for example); testing there on Arch using mozregression did not lose focus.
Comment 21•7 months ago
|
||
If this happens on Wayland it's basically wont fix. The right thing to use on Wayland is libnotify, if that's not working that needs to get looked at.
Comment 22•7 months ago
|
||
I have Xorg running so I'm assuming it's not Wayland, and notifications worked very well before 123.0. Most of the time my notifications are from web.whatsapp.com or web.telegram.org and they steal focus from the browser window and I can Ctrl-Tab between the notification window(s) and the browser window. "About Nightly" says I'm running 126.0a1 (2024-04-05).
Comment 23•7 months ago
|
||
Oops, that is Alt-Tab
Comment 24•7 months ago
|
||
I can confirm that with the public release of 125 this issue is now resolved for me (Arch Linux/X) as expected.
Comment 25•7 months ago
|
||
(In reply to Andrzej Zaborowski from comment #22)
they steal focus from the browser window and I can Ctrl-Tab between the notification window(s) and the browser window.
I should be more specific. I think there is an improvement compared to 123/124 because the popups do not receive input anymore so typing isn't interrupted.
But they still don't behave like other Gnome notifications. They don't "float" on top of other windows. If I bring any other window to front, the notification popup is moved behind it, and can be brought back to front, i.e. like most normal windows.
In ~122 these popups showed consistent in style with other Gnome notifications and were not part of the window stack, they were semitransparent always on top and ordered together with notifications from other apps oldest to newest. They also moved to the top of the screen as older notifications expired.
Comment 26•2 months ago
|
||
I can confirm this is finally fixed for me on Firefox 130.0.1 on Ubuntu 20.04 (Unity 7.7 / X.org), as it was still broken on Firefox 126. The notifications don't steal keyboard focus anymore. Thank you so much guys.
Comment 27•2 months ago
|
||
Sorry I meant 24.04, maybe it has something to do with that too because I updated my distro recently from the previous LTS (22.04) and many packages had significant updates including Compiz and Unity
Comment 28•2 months ago
|
||
Redirect a needinfo that is pending on an inactive user to the triage owner.
:nalexander, since the bug has recent activity, could you have a look please?
For more information, please visit BugBot documentation.
Comment 29•2 months ago
|
||
Yes, also fixed here, ubuntu snap for firefox 132.0a1. The notifications don't steal the focus from firefox anymore which is great.
Visually they're still different from other desktop notifications. I believe up to version 123 they were consistent with other notifications like Network Manager's, Ms Teams' and audio volume updates.
Firefox notifications are not listed in the notification log which you see after clicking a gnome taskbar indicator (mailbox icon) that I think appeared after the 24.04 upgrade.
Description
•