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

Firefox: cannot style programmatically created same-origin iframe #215

Closed
Tamschi opened this issue Oct 19, 2017 · 3 comments
Closed

Firefox: cannot style programmatically created same-origin iframe #215

Tamschi opened this issue Oct 19, 2017 · 3 comments
Labels

Comments

@Tamschi
Copy link

Tamschi commented Oct 19, 2017

* {
    background-color: pink !important;
}
Applies to: Everything

I checked #193, but this seems distinct since the style is correctly applied to the <iframe> on https://userstyles.org/help. The script responsible for <iframe> creation seems to be https://platform.twitter.com/widgets.js, but I don't know how it works in detail.

@Tamschi Tamschi changed the title Styles not working in certain (programmatically created) <iframe>s Styles not working in certain (programmatically created) <iframe>s Oct 19, 2017
@tophf
Copy link
Member

tophf commented Oct 19, 2017

Works correctly in Chrome.
Firefox doesn't inject any WebExtension content scripts in such iframes when the page is loading so evidently there's a bug in FF. I see no way to circumvent it without falling back to our old slow approach of using MutationObserver to monitor all iframe elements recursively. Since I'm not using FF I'm reluctant to do it, and would rather mozilla fix their browser.

@tophf tophf added the external label Oct 19, 2017
@tophf tophf changed the title Styles not working in certain (programmatically created) <iframe>s Firefox: cannot style programmatically created same-origin iframe Nov 1, 2017
@tophf
Copy link
Member

tophf commented Nov 11, 2017

bugzil.la/1389241

@tophf
Copy link
Member

tophf commented Nov 25, 2017

Test version that uses tabs.insertCSS everywhere in FF [edit: updated the link] fixes the issue.
Needs testing with style updates, editing, basically everything. See temporary installation article.

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

No branches or pull requests

2 participants