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

uBO doesn't apply :style() filters in some situations. #2810

Closed
kasper93 opened this issue Jul 21, 2017 · 3 comments
Closed

uBO doesn't apply :style() filters in some situations. #2810

kasper93 opened this issue Jul 21, 2017 · 3 comments

Comments

@kasper93
Copy link
Contributor

kasper93 commented Jul 21, 2017

Describe the issue

Now that I was forcefully converted to webext, let's report some bugs. I've found STR where style is not applied by :style() filter.

One or more specific URLs where the issue occurs

https://www.wykop.pl/wpis/25495975/ublock-lt-3/

Screenshot in which the issue can be seen

Actual

screen shot 2017-07-21 at 15 13 50

Expected

screen shot 2017-07-21 at 15 13 59

Steps to reproduce

  1. Open the URL provided. Everything should look ok.
  2. Open the same page in new tab. Middle mouse button on anything that point to the same page. I suggest timestamp (element after my nick) in post header.
  3. Now switch to the new tab. You will see two things
    ** Cookie warning is hidden with the delay. It is hidden at the moment I switch to the new tab, so it is visible for a second. This is caused probably because user styles are injected in content scripts,
    ** But the main issues is that :style() is not applied at all leaving blank space there.

Reproduced everytime.

Both issues are not present on Chrome.

Your settings

  • Browser/version: Firefox Nighty (20170720030203)
  • uBlock Origin version: 1.13.9.0
Your filter lists

You need POL enabled to have affected filters.

The filters in question

wykop.pl##.cookie
wykop.pl##.type-permanent+#nav:style(top: 0px !important)
wykop.pl##.type-permanent+#nav+div:style(padding-top: 49px !important)
@gwarser
Copy link
Contributor

gwarser commented Jul 21, 2017

Works for me. not any more :/
Nightly 2017-07-21 on linux

@gorhill
Copy link
Owner

gorhill commented Jul 21, 2017

I am assuming this is caused by the fact that the webext version is not using user styles, as opposed to the legacy version.

@gorhill
Copy link
Owner

gorhill commented Jul 23, 2017

After investigation, the issue is not really what I was expecting, I had assumed it was just a case of author css overriding uBO's css. This is not the case -- though probably implementing proper user styles will still fix the issue here.

The problem is that when uBO tries to inject its CSS, the head element of the document has not yet been parsed, and uBO expects this element to be present when injecting its style tag.

@gorhill gorhill changed the title Firefox: webext doesn't apply :style() filters in some situations. uBO doesn't apply :style() filters in some situations. Aug 8, 2017
krystian3w added a commit to FiltersHeroes/PolishSocialCookiesFiltersDev that referenced this issue May 5, 2024
ktoś może zerknąć na:

gorhill/uBlock#2252

gorhill/uBlock#2810

czy filtr nie zakłóca logiki = ja widzę tylko FB i X.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants