Custom filters not applied when opening links in new tab

Description of the issue:
When opening a page in a new tab from a link within the main page (ctrl+left mouse click or click with the mouse scroll wheel, or right click on the link you wish to open, then click “Open link in New tab.” when the menu toolbox appears) the custom defined filter does not apply in the new opened page.

Steps to Reproduce:
1. Open brave://adblock/
2. Scroll to the bottom of the page, to the “Custom Filters” section
3. Define some filters for a domain (Eg.: g4media.ro,www.g4media.ro###custom_html-8)
4. Open a site on which you defined the rule (Eg.: g4media.ro)
5. Open an article from the site in a new tab ( ctrl+left mouse click, or click with the mouse scroll wheel, or right click on the link you wish to open, then click “Open link in New tab.” when the menu toolbox appears)

Actual Result:
The filtered element is still present in the page

Expected Result:
The filtered element should not be present in the page

Reproduces how often:
Always

Brave Version:
Version 1.9.76 Chromium: 81.0.4044.138 (Official Build) (64-bit)

Reproducible on current live release:
Yes

Additional information:

  • When refreshing the page (Eg.: hit F5), the filtered element disappears (the filters are applied after refresh).
  • I’m using Ubuntu 20.04.3 LTS, 64-bit, GNOME Version: 3.36.8, Windowing System: X11.
2 Likes

Modified the test to see if it blocks. Try adding

Testing: https://www.g4media.ro/rusia-pregatita-sa-redirectioneze-livrarile-de-energie-catre-alte-piete-in-cazul-unor-noi-sanctiuni-occidentale-ameninta-ministrul-rus-de-finante-anton-siluanov.html

With g4media.ro,www.g4media.ro##.doneaza-cont in brave://adblock … at the bottom yellow boxes seem to disappear.

Hi,

If you directly access the article(simple left mouse click or put the url in the address bar, then “enter”), they do disappear.
But if you open the article in a new tab with ctrl+left mouse click or click with the mouse scroll wheel from the main page for later reading, they don’t (you have to refresh the page again for the yellow boxes to disappear).

Usually, I open many articles or search results in new tabs with ctrl+left mouse click or click with the mouse scroll wheel, and then I read them one by one later.

Hope I make it clear what my issue is about. Try to open any article from the site for later reading with ctrl+left mouse click or click with the mouse scroll wheel. This is the case when the filters do not apply, and you need an extra refresh of the page for the elements to disappear.

Sorry for my English.
If I need to give more details or technical descriptions for you to reproduce, please ask.

Have a nice day,
Mihai

Not quite sure what the issue here is, some sites will interact differently to filters. But it seems to be working here as intended. I would suspect the filter isn’t good or the site has changed the id.

But adding filters to brave://adblock is working in Release, Beta and Nightly from my testing. I would look at testing a different filter.

Hi,

The example you gave in the first reply was a rule on class, not on ID, but the issue reproduced.
The site did not changed the ID. If I refresh the page, the filters apply.

The key thing here is

open the article in a new tab with ctrl+left mouse click or click with the mouse scroll wheel from the main page for later reading

File-1

So: keep the “ctrl” keybord key pressed and click on a link, while the “ctrl” keybord key is pressed (Ctrl+click). This will open the link in a new tab, while keeping the focus on the main page.
I don’t know if you can catch this with automated tests.
Also, if you use an Apple laptop, I don’t know how to reproduce because there is no “ctrl” key, nor the scrolling wheel. Manually test with a regular laptop.
I use an HP with Ubuntu 20.04 LTS on it.

If you test with an Apple laptop, you could still reproduce in two ways:

  • hold down the COMMAND key and then click on the link you wish to open
  • right click on the link you wish to open, then click “Open link in New tab.” when the menu toolbox appears (maybe you could use this for automated tests?):

Source:
https://www.businessinsider.com/how-to-open-link-in-new-tab-mac#:~:text=You%20can%20also%20open%20link,for%20both%20Safari%20and%20Chrome.&text=This%20shortcut%20will%20automatically%20open,adjacent%20to%20your%20current%20tab.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.