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

uBlock Origin breaks "Open image in new tab" when there is a rule to block popups #3436

Open
9 tasks done
anonghuser opened this issue Oct 31, 2024 · 14 comments
Open
9 tasks done
Labels
Chromium specific to Chromium/Chrome

Comments

@anonghuser
Copy link

anonghuser commented Oct 31, 2024

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

uBlock Origin breaks "Open image in new tab" when there is a rule to block popups.

A manual "Open image in new tab" should not be considered the same as an automatic popup and should not be blocked, the same way as "Open link in new tab" is not.

A specific URL where the issue occurs.

https://bato.to/title/81559-skip-beat-official/2492793-ch_299
https://hentai2read.com/a_former_brave_resident_in_the_dungeon/ (nsfw)

Steps to Reproduce

  1. Go to one of the example urls
  2. Rightclick any image and chose "Open image in new tab"

Expected behavior

The image should open in new tab and stay open.

Actual behavior

In Edge a new tab briefly flashes and immediately disappears.
In Chrome, it doesn't even flash briefly, it just never opens.

uBO version

1.60.0

Browser name and version

Edge 130.0.2849.56
Chrome 130.0.6723.92

Operating system and version

Windows 11

@stephenhawk8054
Copy link
Member

https://bato.to/title/81559-skip-beat-official/2492793-ch_299

I can't reproduce

firefox_Rqi805gaCe.mp4

@anonghuser
Copy link
Author

idk why. i just reproduced it also in chrome.

@stephenhawk8054
Copy link
Member

Can you open new tab > reproduce the issue and on that page > click on uBO icon > 💬 Report button > scroll to the bottom > click on Troubleshooting Information and copy paste it here?

@anonghuser
Copy link
Author

anonghuser commented Oct 31, 2024

uBlock Origin: 1.60.0
Chromium: 130
filterset (summary):
 network: 140587
 cosmetic: 48803
 scriptlet: 22937
 html: 0
listset (total-discarded, last-updated):
 default:
  user-filters: 0-0, never
  ublock-filters: 40518-265, 5m
  ublock-badware: 11724-6, 5m
  ublock-privacy: 1391-22, 5m
  ublock-unbreak: 2493-0, 5m
  ublock-quick-fixes: 229-0, 5m
  easylist: 80404-586, 5m
  easyprivacy: 53214-648, 5m
  urlhaus-1: 20480-0, 5m
  plowe-0: 3542-0, 5m
filterset (user): [empty]
userSettings: [none]
hiddenSettings: [none]
supportStats:
 allReadyAfter: 5034 ms (selfie)
 maxAssetCacheWait: 271 ms
 cacheBackend: indexedDB
popupPanel:
 blocked: 2
 network:
  bookstore.pics: 1
  googletagmanager.com: 1

i guess the "bookstore.pics" is the image

@anonghuser
Copy link
Author

anonghuser commented Oct 31, 2024

do you have easylist filters enabled when trying to reproduce it? the rules that block popups on the example sites are part of easylist.
the "block all popups" button you highlight at the start of your video is not required for reproducing the issue (but should not hinder it either).

@stephenhawk8054
Copy link
Member

I'm using default settings.

@garry-ut99

This comment was marked as abuse.

@gorhill
Copy link
Member

gorhill commented Oct 31, 2024

This EasyList filter is causing the new tab to close:

/^https?:\/\/.*\.(jpg|jpeg|gif|png|svg|ico|js|txt|css|srt|vtt|webp)/$popup,from=...

Unfortunately uBO doesn't know that the tab was opened using a context menu entry, that information is not available to uBO. Not something which can be fixed.

AdGuard and ABP also suffers this issue.

The issue does not exist on Firefox because the event listener onCreateNavigationTarget() is not called in Firefox.

@garry-ut99

This comment was marked as abuse.

@anonghuser
Copy link
Author

anonghuser commented Oct 31, 2024

#932 talks about middle-click which i can not test, however it should be the same as ctrl+click or "open in new tab" for links instead of images, which works fine here. Either things have changed in the four years since, or maybe its just in that specific "Cent" chromium derivative.

And it was actually asking for an easy way to temporarily allow a popup, not to fix how the $popup filters work (if you say this is impossible). I think that's actually a reasonable idea/alternative. Perhaps something like the browser's built-in popup blocker which iirc showed an indication for the blocked popups in the address bar and you can click it to allow/open a specific popup that was blocked. Or, if uBlock Origin is able to see the modifier key state at the time the popup is opened, perhaps allow them if "Ctrl" is being held, or similar.

I'd go as far as to suggest uBlock can probably remove the built-in "Open image in new tab" if its code is such that its impossible to distinguish from automatic popups, and replace it with its own menu item with code that sets a flag or uses a way to open a tab which can be distinguished. Or are extension APIs so limited that even that is impossible now? (I know that was the trend things were going but I'm not aware how bad it's gotten yet)

@garry-ut99

This comment was marked as abuse.

@gorhill
Copy link
Member

gorhill commented Oct 31, 2024

Not something which can be fixed.

suggest uBlock can probably

Whoever thinks it's possible to fix can submit a PR. I prefer people prove me wrong with a PR than me having to spend a lot of time to explain why suggested ideas don't work.

@u-RraaLL u-RraaLL added the Chromium specific to Chromium/Chrome label Nov 1, 2024
@anonghuser
Copy link
Author

anonghuser commented Nov 1, 2024

@garry-ut99 all those are about opening normal links in new tab, which actually works now.
edit: I mean it works on the sample pages above which have $popup filters applied to them. IDK what "no-popup switch" is in comparison and if opening links in new tabs also works with that.

ghajini added a commit to uBlockOrigin/uAssets that referenced this issue Nov 11, 2024
@ghajini
Copy link

ghajini commented Nov 11, 2024

i added fix in uBlockOrigin/uAssets@cc49b9f as i see valid content is blocked
regarding the above regex filter ,EL has been informed

ryanbr added a commit to easylist/easylist that referenced this issue Nov 11, 2024
ghajini added a commit to uBlockOrigin/uAssets that referenced this issue Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chromium specific to Chromium/Chrome
Projects
None yet
Development

No branches or pull requests

6 participants