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

Nested click2load frames not working #3088

Open
9 tasks done
umbralOptimatum opened this issue Jan 20, 2024 · 6 comments
Open
9 tasks done

Nested click2load frames not working #3088

umbralOptimatum opened this issue Jan 20, 2024 · 6 comments
Labels
bug Something isn't working Firefox specific to Firefox

Comments

@umbralOptimatum
Copy link

umbralOptimatum commented Jan 20, 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

I'm trying to use these rules:

||youtube.com^$3p,frame,redirect=click2load.html
||twitch.tv^$3p,frame,redirect=click2load.html
||safe.txmblr.com^$3p,frame,redirect=click2load.html

Tumblr wraps embed iframes in a safe.txmblr.com iframe. When a page has embedded Youtube or Twitch videos, clicking the click2load for safe.txmblr.com loads a second click2load for the embedded video, but clicking it does not load the video or have any other visible effect.

A specific URL where the issue occurs.

https://thefloatingstone.tumblr.com/post/727730225735204864

Steps to Reproduce

  1. Load the above Tumblr page with the two rules enabled.
  2. Click the click2load embed and a second click2load embed should appear.
  3. Click the second click2load embed and nothing visibly happens.

Expected behavior

Click2load should work even when loaded by another click2load.

Actual behavior

Original embed never loads.

uBO version

1.55.0

Browser name and version

Firefox 115.6.0esr

Operating System and version

macOS 10.14.6

@gwarser gwarser added the bug Something isn't working label Jan 21, 2024
@garry-ut99

This comment was marked as abuse.

@gorhill
Copy link
Member

gorhill commented Jan 21, 2024

I spent some time yesterday investigating this.

First, it works reliably in Chromium-based browsers.

Now in Firefox I cannot explain the behavior. I added multiple console.log at key points, and I definitely do see the self.location.replace() call being made with the Youtube URL, but it has no effect -- until some time has passed. Sometimes it works immediately, often there needs to be a delay of up to 30s before it works, but it eventually always work, just with some delay. I have also seen the behavior that allowing Tumblr iframe immediately also allows the YT iframe, so it's extremely inconsistent in Firefox and so far I cannot explain it other than by Firefox doing unexpected things internally.

@gwarser gwarser added the Firefox specific to Firefox label Jan 21, 2024
@umbralOptimatum
Copy link
Author

Thanks for looking into this. I gave it a couple more attempts; the second frame did not load after two minutes but clicking a few extra times loaded it instantly. I've only had it load once after a delay, that's what reminded me to open this issue. Ah well, one layer of click2load is probably fine.

Out of curiosity, did either of you test it with barebones iframes in case it's a tumblr-specific issue?

@gorhill
Copy link
Member

gorhill commented Jan 23, 2024

clicking a few extra times loaded it instantly

Yes, it's what I meant, if we keep clicking it works eventually, sometimes after 10x times. Something inside Firefox is preventing the navigation from taking place. I didn't try to synthesize a minimal case.

@gwarser
Copy link

gwarser commented Jan 23, 2024

This works fine:

http://0.0.0.0:8080/iframe-root.html

iframe-root.html

<!DOCTYPE html>
<html>
        <head> 
        </head>
        <body style="background: yellow;">
        <div><iframe src="http://0.0.0.0:8080/iframe.html" style="width: 50%; height: 600px; background: green;"></iframe>
        </body>
</html>

iframe.html

<!DOCTYPE html>
<html>
        <head> 
        </head>
        <body>
        <div><iframe src="https://example.com/" style="width: 100%; height: 300px; background: blue;"></iframe>
        </body>
</html>
||example.com^$3p,frame,redirect=click2load.html
||0.0.0.0^$frame,redirect=click2load.html

@garry-ut99

This comment was marked as abuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Firefox specific to Firefox
Projects
None yet
Development

No branches or pull requests

4 participants