Opened 5 months ago

Closed 5 months ago

Last modified 3 months ago

#6496 closed defect (fixed)

Account for browsers that don't support notifications with buttons

Reported by: sebastian Assignee: sebastian
Priority: P2 Milestone: Adblock-Plus-3.1-for-Chrome-Opera-Firefox
Module: Platform Keywords:
Cc: greiner Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):

https://codereview.adblockplus.org/29726570
https://codereview.adblockplus.org/29761562

Description (last modified by sebastian)

Background

  • Firefox throws a synchronous error when calling notifications.create({buttons: ...}).
  • Opera responds with an asynchrnous error when calling notifications.create({buttons: ...}).
  • Microsoft Edge doesn't support the notifications API at all (however, this case is handled).

This has been partially addressed in #5354 by not showing notifications of the type question (there is no point if there cannot be buttons), and removing any buttons from other kind of notifications, on Opera.

However, since Firefox throws synchronously, the error there isn't handled currently, causing error messages in the background page, and preventing any kind of notification from being shown on Firefox.

Furthermore, there is not much of a point in subscribing users (on installation) to the "Adblock Warning Removal List" if they cannot see the related notification anyway.

What to change

  • Handle the error thrown on Firefox, with the same fallback we have on Opera, i.e. ignore notifications of the type question and retry to show other notifications without buttons.
  • Don't subscribe users on browsers that don't support notifications with buttons (and therefore will ignore question notifications), by default, to the "Adblock Warning Removal List".

Change History (8)

comment:1 Changed 5 months ago by sebastian

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:2 Changed 5 months ago by sebastian

  • Description modified (diff)

comment:3 Changed 5 months ago by greiner

  • Cc greiner added

comment:5 Changed 5 months ago by sebastian

  • Milestone set to Adblock-Plus-for-Chrome-Opera-Firefox-next
  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:6 Changed 4 months ago by sebastian

  • Review URL(s) modified (diff)

comment:7 Changed 4 months ago by abpbot

comment:8 Changed 3 months ago by Ross

  • Tester changed from Unknown to Ross
  • Verified working set

Done. Notifications appear to be working as expected. Question notifications still work in browsers that support them (Chrome).

ABP 3.0.4.2044
Firefox 59 / 55 / 51 / Windows 10
Chrome 66 / 58 / 49 / Windows 7
Opera 52 / 45 / 36 / Windows 10

Note: See TracTickets for help on using tickets.