Closed
Bug 1417846
Opened 7 years ago
Closed 8 months ago
requireInteraction:true not working with platform-specific desktop notifications (Linux libnotify)
Categories
(Toolkit :: Alerts Service, defect, P2)
Tracking
()
RESOLVED
FIXED
124 Branch
Tracking | Status | |
---|---|---|
firefox124 | --- | fixed |
People
(Reporter: robwu, Assigned: saschanaz)
References
(Blocks 3 open bugs)
Details
(Keywords: dev-doc-needed)
Attachments
(2 files, 1 obsolete file)
When the "requireInteraction" option is set to true, a persistent notification should be shown. This seems not to happen on Linux with the libnotify backend.
https://bugzilla.mozilla.org/show_bug.cgi?id=862395#c26 wrote some suggestions for implementation, but it seems that nobody ever followed up on that, and requireInteraction is only supported for XUL notifications.
STR:
1. Visit about:config and ensure that dom.webnotifications.requireinteraction.enabled is true.
2. Run the following snippet, e.g. from the devtools in a tab:
Notification.requestPermission().then(function() {
new Notification('hello', {requireInteraction:true});
});
Expected:
- A notification shows up that sticks around.
Actual:
- The notification disappears after 5 seconds.
This 5 seconds delay seems to be the default for my system. If I open a terminal and run the following commands, then I can see that the notification disappears at the expected times:
$ notify-send hello # gone in 5 seconds (default).
$ notify-send -t 1000 hello # gone in 1 second.
$ notify-send -t 9000 hello # gone in 9 seconds.
Reporter | ||
Updated•7 years ago
|
Component: DOM → Notifications and Alerts
Product: Core → Toolkit
Comment 1•7 years ago
|
||
It seems like this should be fixed (as much as platform support allows; see bug 862395 comment 26) so we aren't shipping a half-baked platform feature.
Priority: -- → P2
Updated•2 years ago
|
Severity: normal → S3
Updated•1 year ago
|
Component: Notifications and Alerts → DOM: Notifications
Product: Toolkit → Core
Assignee | ||
Comment 2•1 year ago
|
||
I don't think there's any special thing here to be tracked separately, let's track it in bug 1346375.
Assignee | ||
Comment 3•1 year ago
|
||
Oh actually, you say Linux, so why not track it here.
Status: RESOLVED → REOPENED
Component: DOM: Notifications → Alerts Service
No longer duplicate of bug: 1346375
OS: Unspecified → Linux
Product: Core → Toolkit
Hardware: Unspecified → Desktop
Resolution: DUPLICATE → ---
Summary: requireInteraction:true not working with platform-specific desktop notifications → requireInteraction:true not working with platform-specific desktop notifications (Linux libnotify)
Assignee | ||
Comment 4•9 months ago
•
|
||
Note for me:
- Desktop Notifications spec says "resident" is the hint to control this. https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html
- The relevant code in Gecko is nsAlertsIconListener::ShowAlert. (Why is this in
toolkit/
when every other nsIAlertsService implementation is inwidget/
?)
Assignee | ||
Updated•9 months ago
|
Assignee: nobody → krosylight
Assignee | ||
Comment 5•8 months ago
|
||
Assignee | ||
Comment 6•8 months ago
|
||
clang-tidy's modernize-use-using rule wants to use using
instead.
Assignee | ||
Comment 7•8 months ago
|
||
Updated•8 months ago
|
Attachment #9375795 -
Attachment is obsolete: true
Pushed by krosylight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a71193097e1b
Part 1: Use using instead of typedef r=stransky
https://hg.mozilla.org/integration/autoland/rev/bc4d3b22c7eb
Part 2: Pass timeout=0 when requireInteraction=true r=stransky
Comment 9•8 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a71193097e1b
https://hg.mozilla.org/mozilla-central/rev/bc4d3b22c7eb
Status: REOPENED → RESOLVED
Closed: 1 year ago → 8 months ago
status-firefox124:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch
Assignee | ||
Comment 10•8 months ago
|
||
(MDN says requireInteraction is Windows only)
Keywords: dev-doc-needed
You need to log in
before you can comment on or make changes to this bug.
Description
•