Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no-popups: * true auto closes links opened in new tabs #3135

Closed
9 tasks done
emanruse opened this issue Feb 21, 2024 · 11 comments
Closed
9 tasks done

no-popups: * true auto closes links opened in new tabs #3135

emanruse opened this issue Feb 21, 2024 · 11 comments
Labels
invalid not a uBlock issue

Comments

@emanruse
Copy link

Prerequisites

  • I verified that this is not a filter list issue. Report any issues with filter lists or broken website functionality in the uAssets issue tracker.
  • This is NOT a YouTube, Facebook or Twitch report. These sites MUST be reported by clicking their respective links.
  • This is not a support issue or a question. For support, questions, or help, visit /r/uBlockOrigin.
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
  • The issue is not present after disabling uBO in the browser.
  • I checked the documentation to understand that the issue I am reporting is not normal behavior.

I tried to reproduce the issue when...

  • uBO is the only extension.
  • uBO uses default lists and settings.
  • using a new, unmodified browser profile.

Description

no-popups: * true makes links explicitly opened in new tab to close instantly.

A specific URL where the issue occurs.

https://superuser.com/a/1128905

Steps to Reproduce

  1. Use the following settings:
{
  "version": "1.55.0",
  "userSettings": {
    "externalLists": "",
    "firewallPaneMinimized": false,
    "importedLists": []
  },
  "selectedFilterLists": [
    "user-filters"
  ],
  "hiddenSettings": {},
  "whitelist": [
    "about-scheme",
    "moz-extension-scheme"
  ],
  "dynamicFilteringString": "* * * block\n* * inline-script block\n* * 1p-script block\n* * 3p-script block\n* * 3p-frame block\n* * image block\n* * 3p block\nbehind-the-scene * * block",
  "urlFilteringString": "",
  "hostnameSwitchesString": "no-popups: * true\nno-remote-fonts: * true\nno-large-media: * true\nno-csp-reports: * true\nno-scripting: * true",
  "userFilters": "*$stylesheet\n*$document,csp=style-src\n"
}
  1. Visit e.g. https://superuser.com/a/1128905

  2. Click on the "Systemd/User" link inside the answer using middle mouse button or right mouse button and "Open Link in New Tab"

Expected behavior

The URL should open normally in a new tab and the tab should remain open.

Actual behavior

The URL opens in new tab but the tab instantly closes.

The above URL is just one example. This happens on many other websites too. Some links work fine, others don't.

Removing the no-popups: * true rule makes all links work as expected.

uBO version

1.55

Browser name and version

Tor Browser 3.0.9

Operating System and version

Whonix 17

@gwarser
Copy link

gwarser commented Feb 21, 2024

Works as expected. The link is redirecting to different URL.

https://wiki.archlinux.org/index.php/Systemd/User -> https://wiki.archlinux.org/title/Systemd/User

@gorhill gorhill closed this as completed Feb 21, 2024
@gorhill gorhill added the invalid not a uBlock issue label Feb 21, 2024
@emanruse
Copy link
Author

emanruse commented Feb 21, 2024 via email

@gorhill
Copy link
Member

gorhill commented Feb 21, 2024

Related: gorhill/uBlock#2919

@gorhill
Copy link
Member

gorhill commented Feb 21, 2024

What do you mean it works? It doesn't work for me. The tab closes.

You activated the no-popup switch for everywhere, * true. You clicked on a link to open in a new tab. The URL address in the new tab does not match the clicked link, hence uBO sees it as an unwanted popup. If you do not want that behavior, override no-popups: * true rule with a more specific no-popups: superuser.com false.

@emanruse
Copy link
Author

emanruse commented Feb 21, 2024 via email

@gwarser
Copy link

gwarser commented Feb 21, 2024

Searching for house, first link https://nl.wikipedia.org/wiki/House_(televisieserie), resulted page https://nl.wikipedia.org/wiki/House_(televisieserie) not closed - works as expected.

@emanruse
Copy link
Author

emanruse commented Feb 21, 2024 via email

@gorhill
Copy link
Member

gorhill commented Feb 21, 2024

no-popups switch is useful if you do not want to wait for or rely on filter lists to block unwanted popups on a site.


Actually it's what the documentation already says:

Blocking popups depends on whether the proper filters are present in the selected filter lists, so this feature is most useful when a site creates popups for which there are no filters to take care of them in 3rd-party filter lists.

@emanruse
Copy link
Author

emanruse commented Feb 21, 2024 via email

@gorhill
Copy link
Member

gorhill commented Feb 21, 2024

Because bad sites typically do this. Anyway, personally I think enough time has been spent on this, so I'm out.

@Rudxain
Copy link

Rudxain commented Sep 13, 2024

But why is a redirecting URL considered a popup when there is nothing really popping up?

popunders aren't popups, yet they're also undesirable.

See also (by @LiveOverflow):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid not a uBlock issue
Projects
None yet
Development

No branches or pull requests

4 participants