Closed Bug 1337490 Opened 8 years ago Closed 5 years ago

Notifications API Notifications Appear at Top-Right of Screen or Off-Screen

Categories

(Toolkit Graveyard :: Notifications and Alerts, defect)

45 Branch
All
Windows
defect
Not set
normal

Tracking

(firefox-esr52 wontfix, firefox-esr68 wontfix, firefox58 wontfix, firefox59 wontfix, firefox60 wontfix, firefox61 wontfix, firefox74 wontfix, firefox75 wontfix, firefox76 verified, firefox77 verified)

VERIFIED FIXED
mozilla76
Tracking Status
firefox-esr52 --- wontfix
firefox-esr68 --- wontfix
firefox58 --- wontfix
firefox59 --- wontfix
firefox60 --- wontfix
firefox61 --- wontfix
firefox74 --- wontfix
firefox75 --- wontfix
firefox76 --- verified
firefox77 --- verified

People

(Reporter: bugzilla-2, Unassigned)

References

()

Details

(Keywords: regression, regressionwindow-wanted)

Attachments

(4 files)

Attached image Off-Screen Notification.png —
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:51.0) Gecko/20100101 Firefox/51.0 Build ID: 20170125094131 Steps to reproduce: (These steps may not be exact:) • Go to the demo page at http://www.girliemac.com/html5-notifications-webOS-style/ containing a Notifications API demo. • Click the switch button to trigger a notifications request. • Enable notifications for that website in the browser UI. • Enable some or all types of notifications and repeatedly click the "Show Notifications" button to trigger notifications. Actual results: Notifications will first appear at the lower left of the viewport, then at the upper-right of the screen over the browser chrome (in a maximized browser window), then further to the upper-right of the viewport and off-screen leaving only the lower drop shadow of notification boxes visible. A screenshot has been attached showing the last state. Expected results: Notifications should have started appearing at the lower-right of viewport, then stacking vertically until reaching the top of the viewport. When there are too many notifications to fit in the viewport, it's not clear to me what should happen. However, notifications definitely shouldn’t appear off-screen.
Summary: Notifications API Notifications Appear At Top-Right of Screen or Off-Screen → Notifications API Notifications Appear at Top-Right of Screen or Off-Screen
Status: UNCONFIRMED → NEW
Ever confirmed: true
It seems that the cause of this issue is calling the |browser.notifications.create| method multiple times with the same notification ID argument (as tested in Firefox Developer Edition 55.0b14). In theory, doing such a thing should either: (1) throw an error. (2) function the same as calling the unimplemented |browser.notifications.update| method as described in the email at https://mail.mozilla.org/pipermail/dev-addons/2017-February/002582.html (in which case one has to wonder what the point of a redundant |update| method is).
Attached image showcasing of the behavior —
[Tracking Requested - why for this release]: so, I've been seeing this bug happening like 20 times at least. I never cared so much, that I bothered to do a bug report, because this would be noticed and fixed by others anyway. Guess I was wrong though ^^ and I didn't realize that this bug existed already in 53 and therefore is in the current releases. I'm using a multimonitor setup currently: 1440p and to the right of that a 1680x1050 (aligned at the top, as you can see on my screenshot) Win 10 64bit Education edition Firefox 59 (current nightly) It just happened to me again. There were two youtube notifications. I'm able to click and thereby open/hide them, if I move my mouse to the top-most position. after the first notification has been clicked, the shadow was still there and I could click again and a different window opened. I know for affect. that this isn't always happening. because sometimes the notifications also display correctly at the bottom right. I really hope some devs could take a look and maybe fix this in 59 or 60, because this bug doesn't seem to have gotten any attention, yet :) Regards, Djfe I'll try to reproduce this in a new profile.
Attached image top-right —
Ok this is easily reproducable in a new profile with the website Patrick linked. Once more than one type is enabled (e-mail, calendar and facebook), then all notifications end up at the top-right (usually above your screen) if you then close them all, go back to one type then they are displayed at the top-right in the visible area for some reason. Very weird behavior (see screenshot) pls take a look
I'm not sure if this was fixed, then reappeared, or if it's been a regression since 53 or before. So, is the problem only apparent when there are two monitors? Can you reproduce this on the release version ( 57)?
Flags: needinfo?(bugzilla.at.mozilla)
Keywords: regression
Hi Liz, I'm not sure whether this was fixed either, but I can easily reproduce it in the current release channel (58) and in the nightly. (release is a fresh profile, nightly isn't) I tested once with two monitors, then closed Firefox, disabled the second monitor in Windows and opened Firefox again. It doesn't seem to matter at all, how many monitors I'm using. The bug is the same with one monitor. My main monitor has 2560x1440, my second 1680x1050. I'm using multi-gpu currently (enabled in UEFI). GTX 980 -> 1440p Monitor Intel HD 530 (i7 6700k) -> 1680x1050 Monitor For proof and to allow others to reliably reproduce this issue, I recorded a video. Take a close look at the top right, you can see the bottom shadow of the notification, and I'm able to click on it. The most interesting part is at 2mins into the video Notifications sliding downwards and showing at the bottom and the top of the screen at the same time :D https://www.youtube.com/watch?v=d6ttcUbMlfE in-case it helps: my about:support from the nightly (I could also do one of the fresh release profile, if you request it): https://pastebin.com/ePzsFwAy
(In reply to Liz Henry (:lizzard) (needinfo? me) from comment #6) > I'm not sure if this was fixed, then reappeared, or if it's been a > regression since 53 or before. > So, is the problem only apparent when there are two monitors? > Can you reproduce this on the release version ( 57)? This bug is still present on a single-monitor setup in Firefox 57.0.4 and Firefox Developer Edition 59.0b2 on Windows 10 Pro, 64-Bit and, as far as I know, was never fixed, so I don't believe that this is a regression. I've attached a zip file to this bug with test extension files that can be used to trigger the bug by pressing the keyboard shortcut Ctrl+Shift+Y after the extension is generated via the about:debugging page. The notification will not be visible, but the drop shadow will be visible at the top-right of the screen assuming that whatever is at the top-right of the screen is light enough for one to see the drop shadow. The Firefox window doesn't need to be at the top-right of the screen for the drop shadow to appear. Simply adding a call to the console.log method between calls to the notifications.create method is enough to make the bug disappear. This gives me the impression that the bug is time-sensitive.
Flags: needinfo?(bugzilla.at.mozilla)
Also, I'll add that the test extension keyboard shortcut doesn't appear to reliably trigger the bug on a dirty profile; I'd test it on a clean profile.
Matt, this may not be a recent regression but it looks like we have steps to reproduce and a test case here. Can anyone take a look, maybe for 60?
Flags: needinfo?(MattN+bmo)
Nobody has been working on Notifications UI for a while so this would require a context switch away from current priorities. Redirecting to Dolske.
Flags: needinfo?(MattN+bmo) → needinfo?(dolske)
I'm removing the regression keyword since this isn't a new regression and we don't want to track it like we track other (recent) regressions.
It keeps happening when there's a big influx of notifications at browser startup, doesn't seem to happen if the browser is already running. Had that happen on 58(beta and stable), 59(beta), 60(Nightly), and still happening as of 2/2/2018. Windows 10 Pro x64 build 1709, single monitor 1920x1080 setup, 110% scale.
Has Regression Range: --- → no
Priority: -- → P1
for me this is happening regardless of whether the browser ran for hours or not. It happens though, if several messages are coming in at a similar time, I think.
Has STR: --- → yes
OS: Unspecified → Windows
Hardware: Unspecified → All
Version: 53 Branch → 45 Branch
I'll just make sure Matt sees comment 18 with a handy needinfo :)
Flags: needinfo?(MattN+bmo)
I talked to Dolske about this bug the other day and I believe he had a potential owner in mind.
Flags: needinfo?(MattN+bmo)
This (and related bugs) is on Mike de Boer's team radar for investigation soon.
Flags: needinfo?(dolske)
Still seeing this (Nightly 61.0a1 (2018-05-05) (64-bit), Windows 10). Sometimes it occurs randomly as well, but mostly when there is a flood of notifications.
I attempted to reproduce and understand this issue and then, I tried to find an old enough version on which this issue would not occur. This is what I found: 1. Mozilla Nightly - 62.0a1 - issue reproduction as described. 2. Mozilla Beta - 60.0 - issue reproduction as described. 3. Mozilla release - 59.0.3 - issue reproduction as described. 4. Mozilla ESR - 52.7.4 - issue reproduction as described. ...then I took old release versions: 5. Mozilla release 55.0.2 - issue reproduction as described. 6. Mozilla release 53.0.3 - issue reproduction as described. 7. Mozilla release 52.0.2 - issue reproduction as described. 8. Mozilla release - 40.0.2 - the notifications pop-up looks different from release version (older design); one notification is displayed correctly, but 2 notifications are not displayed at all (shadow is not visible with this design); The issue is still reproducible. 5. Mozilla release - 30.0 - the notifications pop-up looks different from release version (older design); one notification is displayed correctly, but 2 notifications are not displayed at all (shadow is not visible with this design).The issue is still reproducible. 6. Mozilla release - 20.0.1 - this version does not support notifications. As a result, this issue does not seem to be a regression. Basically, the issue is that if 2 notifications are being displayed at once, their position is spilling out in the top right corner of the screen (notification pop-up shadow is visible in versions over ~v50).
I kinda just lost my tabs due to this :/ I closed firefox, while some notifications where open (the shadow was still on the top-right, when no window was open) Seems like Firefox handled this, as if I closed a window while another window is still open (and therefore deleted all tabs from that window from the session). (I closed the remaining firefox processes with the task manager) The next session was fresh. I made a backup of my sessionstore and the sessionstore-backups folder after realizing this on the next firefox start (I actually started firefox twice since then). the sessionstore.js and all backup files contain all tabs, but opening firefox only reveals the two tabs from the Firefox session after this happened. Replacing sessionstore with one of the two backups doesn't restore the tabs for some reason. (my sessionstore.js is 14MB big (a few hundred tabs ^^), so the tabs are definitely still in there) It would be great if someone could console me on restoring my old session :) thx in advance!
oh, and the "restore session button" didn't appear below the "open new private tab" button
nvm, I just found it :) :) :) history->open previous closed windows Thank god for the session restore options in Firefox!!
Moving to p3 because no activity for at least 24 weeks.
Priority: P1 → P3
I have this bug too, please fix it! i get a shadow on top-left/right. and when i click on it its opening the notifications. and its annoying.

I experience this bug all the time as well. Currently using Firefox 64.0.2.

Please look into this this. I get several Youtube notifications at once when I start Firefox and they all appear off-screen at the top-right, but you can click the shadow. That not only means that I can't see them, but that they also get on top of the Close button of all my applications, so I have a hard time closing any application without accidentally clicking the popup and opening a new tab with the video.

#1263155 seems to be a dupe of this.

It seems I'm also hit by another bug (not sure if it has been reported) where the notifications will never close unless I click the X or the notification itself. Yes, this also means that the notifications at the top-right won't close until I click them all in succession or I close the browser. As you can imagine, it gets annoying quickly.

User agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0
Build ID: 20190507214514

I think, I have valuable information:

I wrote an extension (lets call it A), that is showing notifications using promises. Because it did not work under webkit (Of course Opera and not Chrome! :) for this reason, I decided to rewrite it with the old API, instead of using a polyfill (polyfills are too inconvenient to me...). I created a new extension for this. Lets call it B.

Here is the result:
extension A (with promises): works fine! *)
extension B (old API): notification are out of screen most of the time (maybe to 98%)

*) Only if a notification is already out of the screen (from extension B), extension A does also stack it's notifications to that one and therefore is also out of the screen.

Can the other reporters confirm this?

=> Please fix this bug, before developing new features. - It is really annoying!

PS - I guess I should mention also following:

The goal of this extension was, to test messaging. - On a browserAction click the background script is sending a message to the content script, which is doing then two things:

  • responding direktly
  • sending a new message back to the background script

In both cases a notification is shown (for debugging, since console outputs are not available in the background script). This means, that there are always two notifications right after each other. - After the reports above, this should also be important to know...

Sorry, I have to correct myself!

It has nothing to do with using promises or not. My test webextension, which is using promises did raise just one notification. The one using the old API creates two of them as explained above... If I remove one notification in that extension, it is working fine too.

-> So the problem occures almost every time, when notifications are raised too fast after each other. Please fix this Mozillians.

There are multiple issue here:

Initially, the shadow of the combination was shown (regression in comment 18). Later, the lower part of a notification gets shown here (tested with Windows 8.1). For that, the regression range is https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=76733110704b975154ac0fa779445e6eae5da559&tochange=ac338559876df7b2e81388f2aac28d2e95ceb5ff this should be from bug 1240085 (not adding it as a regression because it's not the initial one).

With a dual screen setup (second screen above primary one):
Until the regression range with bug 1240085 landed, the widgets are shown on the primary if Firefox is on the secondary one and align vertically and start from the bottom. After it landed, they are shown on the primary screen and not aligned, either on the center left (1920x1080 screen, Windows 8.1) or at the bottom left and partially cut off (4K, Windows 10).

This behavior is also triggered if e.g. Google Calendar contains two events and fires a notification for each at the same time.

Requesting re-triage.

Steps to reproduce:

  1. Open a page which allows script execution (no restriction by CSP), e.g. https://wiki.mozilla.org/
  2. Open the Web Console: Press Ctrl+Shift+K
  3. Run this in the console: Notification.requestPermission();
  4. If it is a recent Firefox version: Click onto the speech bubble in the location bar on the left and allow notifications.
  5. Run this in the console:
var n1 = new Notification("Hi! 1");
var n2 = new Notification("Hi! 2");
See Also: → 1240085

(In reply to Sebastian Hengst [:aryx] from comment #34)

There are multiple issue here:

Initially, the shadow of the combination was shown (regression in comment 18). Later, the lower part of a notification gets shown here (tested with Windows 8.1). For that, the regression range is https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=76733110704b975154ac0fa779445e6eae5da559&tochange=ac338559876df7b2e81388f2aac28d2e95ceb5ff this should be from bug 1240085 (not adding it as a regression because it's not the initial one).

This should be fixed by bug 1007344 in the next Nightly.

With a dual screen setup (second screen above primary one):
Until the regression range with bug 1240085 landed, the widgets are shown on the primary if Firefox is on the secondary one and align vertically and start from the bottom. After it landed, they are shown on the primary screen and not aligned, either on the center left (1920x1080 screen, Windows 8.1) or at the bottom left and partially cut off (4K, Windows 10).

Can you check if this is also fixed, if not, maybe morph this bug to be about it if that makes sense? (I didn't read all the history)

Flags: needinfo?(aryx.bugmail)

Multiple notifications are also aligned to the bottom left.

Patrick, do you still observe the issue with the latest Nightly build downloaded from https://www.mozilla.org/en-US/firefox/channel/desktop/ ?

Flags: needinfo?(aryx.bugmail) → needinfo?(bugzilla-mozilla)
Flags: needinfo?(bugzilla-mozilla)

Resolving as fixed. Please create a new bug if you still experience issues with desktop notifications. Thank you.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
Flags: qe-verify+

Successfully reproduced the issue on Nightly (2018-01-20) under Windows 7 following the steps from Comment 0 and notifications were top right offscreen.

The issue is fixed on Firefox 76.0b7 and Nightly 77.0a1 (2020-04-23). Tests were performed under Windows 7 (x64) and Windows 10 (x64).

Status: RESOLVED → VERIFIED
Flags: qe-verify+

I'm experiencing this issue on Fx 97.0.1 under Manjaro KDE and alerts.useSystemBackend = false because I don't like native OS notification. Notifications are showing up top right instead of bottom right.

Should I open a new issue or should this one be reopened?

:aryx said open a new issue.
if this is relevant, then reference it in the new one

Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: