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

Element block picker shows blank page when the Dark Reader extension is installed/enabled #29185

Closed
Zelmanyr opened this issue Mar 20, 2023 · 3 comments · Fixed by brave/brave-core#17682 or brave/brave-core#17714

Comments

@Zelmanyr
Copy link

Zelmanyr commented Mar 20, 2023

Hi,

When Dark Reader is installed on Brave, when a website is stylised by it and we want to block an element on the page with Right Click > Brave > Blocked element, normally we would see the website and can select an element, but now we see a blank page but still can select an element to block (but it is annoying since we don't really see the element due to the blank page).

Screenshot: https://i.imgur.com/flt4kZp.png

To note that, if Dark Reader is disabled, it works correctly.

Edit: Now that I tried more, it seems that it also have an issue on Github whether the Dark Reader extension is disabled or not. Yeah, I confirm that with all extensions disabled, the blocked element picker does not work on Github. Other websites might be affected too then.

Have a good day.

@antonok-edm
Copy link
Collaborator

(transferring issue to brave-browser, since it's not directly related to the adblock engine)

@antonok-edm antonok-edm transferred this issue from brave/adblock-rust Mar 20, 2023
@antonok-edm antonok-edm self-assigned this Mar 20, 2023
@antonok-edm
Copy link
Collaborator

Appears to be related to the CSS color-scheme property. Apparently the iframe is given a non-transparent black background in a dark color scheme, but a transparent background in a light color scheme. We could fix this by forcing a light colorscheme on the generated iframe element.

@stephendonner
Copy link

stephendonner commented Apr 5, 2023

Verified PASSED

Brave 1.51.77 Chromium: 112.0.5615.49 (Official Build) beta (x86_64)
Revision bd2a7bcb881c11e8cfe3078709382934e3916914-refs/branch-heads/5615@{#936}
OS macOS Version 11.7.5 (Build 20G1225)

Case One: Dark mode - PASSED

Steps:

  1. installed 1.51.77
  2. launched Brave
  3. opened brave://settings/appearance
  4. changed Brave colors to Dark
  5. loaded https://github.com/brave/brave-browser
  6. context-clicked on the page
  7. chose Brave > Block element
  8. clicked Create
  9. confirmed the selected region was hidden/blocked
  10. opened brave://adblock
  11. confirmed the adblock rules were present
  12. removed them
  13. clicked Save changes
  14. reloaded github.com
  15. confirmed the formerly-blocked region was now visible/unblocked
example example example example example example example
Screen Shot 2023-04-05 at 4 45 25 PM Screen Shot 2023-04-05 at 4 48 03 PM Screen Shot 2023-04-05 at 4 48 06 PM Screen Shot 2023-04-05 at 4 48 11 PM Screen Shot 2023-04-05 at 4 48 20 PM Screen Shot 2023-04-05 at 4 48 26 PM Screen Shot 2023-04-05 at 4 48 36 PM

Case Two: #enable-force-dark mode - PASSED

Steps:

  1. installed 1.51.77
  2. launched Brave
  3. opened brave://flags
  4. set brave://flags/#enable-force-dark to Enabled
  5. clicked Relaunch
  6. loaded https://github.com/brave/brave-browser
  7. context-clicked on a page element
  8. chose Brave > Block element
  9. clicked Create
  10. confirmed the blocked region's content was hidden/blocked
  11. opened brave://adblock
  12. confirmed the filter-rules were present
  13. removed them
  14. clicked Saved changes
  15. reloaded github.com
  16. confirmed the previously-blocked content re-appeared
brave://flags example example example example example example
Screen Shot 2023-04-05 at 4 24 09 PM Screen Shot 2023-04-05 at 4 26 59 PM Screen Shot 2023-04-05 at 4 29 04 PM Screen Shot 2023-04-05 at 4 29 12 PM Screen Shot 2023-04-05 at 4 29 21 PM Screen Shot 2023-04-05 at 4 38 21 PM Screen Shot 2023-04-05 at 4 38 38 PM

@rebron rebron changed the title Issue with element block picker when the extension Dark Reader is installed Element block picker shows blank page when the extension Dark Reader is installed Apr 26, 2023
@rebron rebron changed the title Element block picker shows blank page when the extension Dark Reader is installed Element block picker shows blank page when the Dark Reader extension is installed/enabled Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment