Opened on 03/27/2015 at 05:56:02 PM
Closed on 11/10/2017 at 11:15:18 AM
#2224 closed defect (rejected)
Notification click listeners added but never removed
Reported by: | greiner | Assignee: | |
---|---|---|---|
Priority: | Unknown | Milestone: | |
Module: | Adblock-Plus-for-Firefox | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Platform: | Unknown | |
Ready: | no | Confidential: | no |
Tester: | Verified working: | no | |
Review URL(s): |
Description
Environment
Ubuntu 14.04
Firefox 36.0.4
Adblock Plus 2.6.8.3917
How to reproduce
- In lib/ui.js replace
let notification = Notification.getNextToShow(url);
withlet notification = { links: ["contribute"], message: "Click on <a>this link</a> to open window", title: "Notification", type: "information" };
- Build and load extension
- Go to any webpage, notification pops up
- Click on link in notification
- Reload webpage, notification pops up
- Click on link in notification
Observed behaviour
- Step (4) opens one new window
- Step (6) opens two new windows
Expected behaviour
- Step (4) opens one new window
- Step (6) opens one new window
Background
We attach a click listener to the notification to handle clicks on links contained inside the notification message. However, this listener is added each time a notification is shown without ever removing them which means that the more notifications are shown the more windows are being opened.
What to change
Move the click listener declaration in lib/ui.js from the _showNotification() method to the applyToWindow() method.
Attachments (0)
Change History (1)
comment:1 Changed on 11/10/2017 at 11:15:18 AM by trev
- Resolution set to rejected
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
Mass-closing all bugs in Adblock Plus for Firefox module, the codebase of Adblock Plus 3.0 belongs into Platform and User-Interface modules. Old bugs are unlikely to still apply.