[10.13] Notification does not differ between close button and notification text




Widget: Cocoa
a month ago
16 days ago


(Reporter: Paenglab, Assigned: spohl)


(Blocks: 1 bug, {regression})

Mac OS X
Dependency tree / graph

Firefox Tracking Flags

(firefox56 wontfix, firefox57 affected, firefox58 affected)


(Whiteboard: [tpi:+])


(1 attachment)



a month ago
+++ This bug was initially created as a clone of Bug #1409370 +++

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Safari/604.1.38

Steps to reproduce:

When a new email arrives, click the "Close" button in the native macOS notification that appears.

Actual results:

The notification is dismissed, but the corresponding email is also opened, full-screen.

Expected results:

The email should only be opened when clicking in the body of the notification. When clicking the Close button, the notification should simply be dismissed.

Comment 1

a month ago
From bug 1409370 comment 16:

This is a bug or missing feature in nsIAlertsService, the same thing happens in Firefox with this code:

var as = Components.classes["@mozilla.org/alerts-service;1"].getService(Components.interfaces.nsIAlertsService);

var listener = {
  observe: function(subject, topic, data) {
    alert("TOPIC: " + topic + " - " + subject + " - " + data);
as.showAlertNotification("", "title", "text", true, "cookie", listener, "", "auto", "", "", null, false, false )

Running this code, you get an "alertclickcallback" notification both when the close button is clicked and the text is clicked. There is no way to differentiate them in the observer notification.

Path forward would be to file a bug in Toolkit :: Notifications and Alerts to allow differentiating the two, then we can take action in Thunderbird.
[Tracking Requested - why for this release]: Close button works improperly on push/web notifications in macOS 10.13

There was likely a change to the undocumented methods we were using to handle this case: https://dxr.mozilla.org/mozilla-central/rev/20d57b9c4183973af4af5e078dff2aec0b74f928/widget/cocoa/OSXNotificationCenter.mm#123-140
Blocks: 1379811
Has Regression Range: --- → irrelevant
status-firefox56: --- → wontfix
status-firefox57: --- → affected
status-firefox58: --- → affected
tracking-firefox57: --- → ?
Component: Notifications and Alerts → Widget: Cocoa
Keywords: regression
Product: Toolkit → Core
Hardware: x86 → All
Potential solution: https://stackoverflow.com/questions/46610367/nsusernotification-close-calls-didactivatenotification


28 days ago
Assignee: nobody → spohl.mozilla.bugs
Priority: -- → P1
Whiteboard: [tpi:+]

Comment 4

24 days ago
Does this only happen on 10.13? Comment 0 mentions 10.12.

Also, I don't see a close button in these alerts at the moment. I tried the code in comment 1 in Firefox in 10.12 and 10.13 as well as Thunderbird email notifications on 10.12.
Flags: needinfo?(richard.marti)

Comment 5

24 days ago
To see the buttons in the alerts, you need to go into Mac System Preferences > Notifications and set the notification type to "Alert" rather than "Banner".

Comment 6

24 days ago
Created attachment 8922452 [details]

Here is a screenshot of this setting. In german, but this should help.

I have no 10.12, only 10.11 and 10.13. On 10.11 it works.

Scottishwildcat, in bug 1409370 you wrote about 10.12. Please can you answer?
Flags: needinfo?(richard.marti) → needinfo?(scottishwildcat)

Comment 7

24 days ago
Yes, it works as expected in 10.12 and earlier. I'm only seeing this issue in 10.13.
Flags: needinfo?(scottishwildcat)

Comment 8

24 days ago
Thanks! Testing on 10.13.1 Beta (17B35a), I'm unable to reproduce the problem. I get alertfinished when clicking the close button and "alertclickcallback" when clicking the text. Could you check if this is still an issue for you in the 10.13.1 Beta?

I've noticed that Apple released a newer Beta version than the one I have currently installed. I'll update and check to make sure I still can't reproduce.
Flags: needinfo?(scottishwildcat)

Comment 9

24 days ago
I have an Apple developer account, so yes, I'll check the beta and let you know.
Flags: needinfo?(scottishwildcat)

Comment 10

24 days ago
I've just tested in 17B35A, and I can confirm that the notification does appear to work as expected there.
(In reply to scottishwildcat from comment #10)
> I've just tested in 17B35A, and I can confirm that the notification does
> appear to work as expected there.

Sounds as if we can close this out as works for me based on this comment.

Comment 12

23 days ago
Works as expected in macOS 10.13.1.
Last Resolved: 23 days ago
Resolution: --- → WORKSFORME
Release Note Request (optional, but appreciated)
[Why is this notable]: 10.13.1 might not ship before Firefox 57, so therefore users may encounter this bug. 
[Affects Firefox for Android]: No
[Suggested wording]:
[Links (documentation, blog post, etc)]:

Adjusting tracking flags based on the fact this is addressed in the next Mac dot release. Also nominating for a release note in case we think that would be helpful.
tracking-firefox57: ? → ---
relnote-firefox: --- → ?
10.13.1 shipped on October 31, so I don't think we need to track this for release notes.
relnote-firefox: ? → ---

Comment 15

16 days ago
Just to confirm, 10.3.1 also fixes the problem for me on the MacBook that caused me to file the original bug.
You need to log in before you can comment on or make changes to this bug.