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

If a large media element originates from css, you cannot click the element to fetch the image. #1670

Closed
8 tasks done
pseay opened this issue Jul 27, 2021 · 8 comments
Closed
8 tasks done
Labels
bug Something isn't working fixed issue has been addressed

Comments

@pseay
Copy link

pseay commented Jul 27, 2021

Prerequisites

I tried to reproduce the issue when...

  • uBO is the only extension
  • uBO with default lists/settings
  • using a new, unmodified browser profile

Description

If the large media element is in a style attribute (e.g. style="background-image: url(https://...)" ) and the image is blocked, clicking on the image placeholder will not cause the image to be reloaded.

A specific URL where the issue occurs

https://www.spreadprivacy.com/one-click-preference-menu/

Steps to Reproduce

  1. If your setting "Block media elements larger than [ ] KB" is above 62 KB, set it to something lower like 50 KB (default)
  2. Go to this article: https://www.spreadprivacy.com/one-click-preference-menu/
  3. Toggle the large media element blocking so it's on
  4. Hit ⌘/Ctrl + Shift + r to reload the page ignoring the cache

Expected behavior

I would expect the image placeholder to have a dotted red border around it and that when I click on it, it would fetch the image and display it.

Actual behavior

The image placeholder was not recognized by uBlock and so I could not interactively reload the image by clicking on the placeholder.

uBlock Origin version

v1.36.2

Browser name and version

Brave: Version 1.27.108 Chromium: 92.0.4515.107 (Official Build) (64-bit)

Operating System and version

Windows 10. Version: 21H1

@gorhill
Copy link
Member

gorhill commented Jul 27, 2021

I don't believe this can be fixed, or if it can be fixed somehow, I suspect it would take a huge amount of work, so closing as wontfix. This has to be accepted as a limitation of the feature.

@gorhill gorhill closed this as completed Jul 27, 2021
@gorhill gorhill added the wontfix won't be addressed label Jul 27, 2021
@Rudxain
Copy link

Rudxain commented Sep 15, 2024

I have a similar problem with Tumblr (no-scripting): images seem to get fetched, but not displayed.

An easy workaround (on Firefox Android) is to hold (right-click equivalent) the element, then "Open image in new tab"

@stephenhawk8054
Copy link
Member

@Rudxain Can you give exact link?

No content is being able to load when I use no-scripting, and no images requests are being fetched to me either:

image

@Rudxain
Copy link

Rudxain commented Sep 15, 2024

@Rudxain Can you give exact link?

I meant image posts, such as this one

@Rudxain
Copy link

Rudxain commented Sep 24, 2024

Can someone please mention this issue in the Wiki?

@stephenhawk8054
Copy link
Member

Images shown normally for me with no-scripting

image

@Rudxain
Copy link

Rudxain commented Sep 24, 2024

Before click:
red outlines

After click:
grey outlines

@gorhill
Copy link
Member

gorhill commented Sep 24, 2024

The issue is that the img element doesn't have a src attribute, it has only a srcset attribute, and the content script responsible to force a load of an image on click doesn't take into account the srcset element. This is fixable, and will be fixed in next dev cycle.

gorhill added a commit to gorhill/uBlock that referenced this issue Sep 26, 2024
Related feedback:
uBlockOrigin/uBlock-issues#1670 (comment)

The issue affected images supporting `srcset` attribute without
the presence of `src` attribute. This commit takes add fallback
onto `srcset` attribute when the `src` attribute is not present.
@MasterKia MasterKia added bug Something isn't working fixed issue has been addressed and removed wontfix won't be addressed labels Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed issue has been addressed
Projects
None yet
Development

No branches or pull requests

5 participants