Closed
Bug 1418287
Opened 8 years ago
Closed 8 years ago
Add preference to disable native notifications (and use XUL notifications instead)
Categories
(Toolkit Graveyard :: Notifications and Alerts, enhancement)
Tracking
(firefox59 fixed)
RESOLVED
FIXED
mozilla59
Tracking | Status | |
---|---|---|
firefox59 | --- | fixed |
People
(Reporter: robwu, Assigned: robwu)
References
Details
Attachments
(1 file)
Bug 858919 brought native desktop notification support through libnotify to Linux.
I did not like the UX back then and created and add-on to revert back to XUL notifications: https://addons.mozilla.org/en-US/firefox/addon/no-native-notifications/
With Firefox 57, this add-on does not work any more.
I tried to give native notifications another go, but was disappointed by the buggy behavior:
bug 1418281 (onclick is not fired at all, onclose is fired too early)
bug 1417846 (requireInteraction is not supported)
I want an option to revert back to XUL notifications, to be able to continue using desktop notifications until the above issues are resolved.
Comment hidden (mozreview-request) |
Assignee | ||
Comment 2•8 years ago
|
||
I manually tested that the patch works, as follows:
1. Build Firefox with the patch.
2. Run:
Notification.requestPermission().then(() => new Notification('hello'));
3. Confirm that a system notification is shown (=current default behavior).
4. Visit about:config, search for the name of the pref (alerts.useSystemBackend) and flip it (to false).
5. Repeat step 2, and confirm that a XUL notification is shown.
6. Repeat step 4 to flip the pref back to true.
7. Repeat step 2, and confirm that a system notification is shown.
Comment 3•8 years ago
|
||
mozreview-review |
Comment on attachment 8929414 [details]
Bug 1418287 - Add preference to disable the system notification service
https://reviewboard.mozilla.org/r/200740/#review205950
::: toolkit/components/alerts/nsAlertsService.cpp:177
(Diff revision 1)
> +bool nsAlertsService::ShouldUseSystemBackend()
> +{
> + if (!mBackend) {
> + return false;
> + }
> + return Preferences::GetBool("alerts.useSystemBackend", true);
AddBoolVarCache instead.
Attachment #8929414 -
Flags: review?(amarchesini) → review+
Comment 4•8 years ago
|
||
mozreview-review |
Comment on attachment 8929414 [details]
Bug 1418287 - Add preference to disable the system notification service
https://reviewboard.mozilla.org/r/200740/#review205952
I want to see it again with AddBoolVarCache.
Attachment #8929414 -
Flags: review+ → review-
Comment hidden (mozreview-request) |
Comment 6•8 years ago
|
||
mozreview-review |
Comment on attachment 8929414 [details]
Bug 1418287 - Add preference to disable the system notification service
https://reviewboard.mozilla.org/r/200740/#review205980
Attachment #8929414 -
Flags: review?(amarchesini) → review+
Pushed by rob@robwu.nl:
https://hg.mozilla.org/integration/autoland/rev/490462a74289
Add preference to disable the system notification service r=baku
Comment 8•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Updated•8 years ago
|
Component: DOM → Notifications and Alerts
Product: Core → Toolkit
Updated•2 years ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•