Changes between Version 7 and Version 8 of Ticket #6948


Ignore:
Timestamp:
10/01/2018 10:53:49 AM (22 months ago)
Author:
kzar
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6948

    • Property Cc Ross added
  • Ticket #6948 – Description

    v7 v8  
    1717- to see again the "block element" option just click another tab and then go back to the images page 
    1818 
    19  
    2019Reported here: 
    2120https://adblockplus.org/forum/viewtopic.php?f=10&t=59376&start=0 
    2221 
     22=== Hints for testers === 
     23With this fix I rewrote the context menu logic, so we'll need to test our "Block element" right-click context menu button quite thoroughly. 
     24 
     25On Firefox for Android the context menu should not be displayed, since the filter composer isn't designed for mobile and some of the required APIs aren't available. Please test that general adblocking functionality works OK there, since this change has modified the "If not Firefox for Android" checks. 
     26 
     27On other platforms, the "Block element" context menu is supposed to show up when the user right-clicks on image, video and audio elements. But only if the page isn't whitelisted, and if the page was loaded after the extension was last installed/reloaded. When the "Block element" button in the context menu is clicked, the filter composer window should pop up and the element which was right clicked should be highlighted red. 
     28 
     29Behind the scenes, the browser actually only lets us add or remove our context menu item for _all_ tabs in all windows at once. So, we actually watch to see when the user changes tab, to check if we should display the context menu for the current tab. Supposing the user switches from one whitelisted tab to another, we don't have to do anything, but then if they switch to a non-whitelisted page we might have to then add our context menu item. 
     30 
     31So, test things like switching between tabs and windows and check that the context menu is displayed when it should be.