Open Bug 1417846 Opened 7 years ago Updated 1 year ago

requireInteraction:true not working with platform-specific desktop notifications (Linux libnotify)

Categories

(Toolkit :: Alerts Service, defect, P2)

39 Branch
Desktop
Linux
defect

Tracking

()

REOPENED

People

(Reporter: robwu, Unassigned)

References

(Blocks 3 open bugs)

Details

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.
Blocks: 1417848
Component: DOM → Notifications and Alerts
Product: Core → Toolkit
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
Severity: normal → S3
Component: Notifications and Alerts → DOM: Notifications
Product: Toolkit → Core

I don't think there's any special thing here to be tracked separately, let's track it in bug 1346375.

Status: NEW → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1346375
Resolution: --- → DUPLICATE

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)
You need to log in before you can comment on or make changes to this bug.