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 picker can be covered by native <dialog> / [popover] pop-ups #2027

Open
8 tasks done
krystian3w opened this issue Mar 3, 2022 · 14 comments
Open
8 tasks done
Labels
something to address something to address

Comments

@krystian3w
Copy link

krystian3w commented Mar 3, 2022

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

New native dialog pop-ups is rendered higher than element picker iframe, so if element is selected then no possible click in "create" button. Similar to #1098, #987

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog
https://developer.mozilla.org/en-US/docs/Web/CSS/::backdrop
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/popover


AdGuard freeware Addon have similar limitation as long use iframe #adguard-assistant-dialog.

A specific URL where the issue occurs

https://gistcdn.githack.com/krystian3w/4ebb7b77634d94a9b2f7238dcee32947/raw/index.html or https://gistcdn.githack.com/krystian3w/4ebb7b77634d94a9b2f7238dcee32947/raw/index2.html

real world cases:

  • https://www.blogmojo.de/chatgpt-alternative/

  • indagare.com

  • computerbase.de

  • https://en-us.topographic-map.com/map-vx51/San-Francisco/?center=37.90303%2C-121.83254&zoom=12

  • https://www.warzywapolowe.pl/

Steps to Reproduce

  1. try open demo page - credits: CSS-Tricks team
  2. click in blue open button
  3. try block opened dialog by element picker
  4. try save created proposition form element picker interface

Expected behavior

Actual behavior

uBlock Origin version

1.58.1b12

Browser name and version

Firefox 128.0

Operating System and version

Windows 11 Pro 23H2

@u-RraaLL
Copy link
Contributor

u-RraaLL commented Mar 3, 2022

Doesn't gorhill decline issues based just on proof on concept instead or real cases?

@krystian3w
Copy link
Author

Maybe but what happens when these pop-ups start cover 99% of Internet or start used to disable use element picker (small ads in sidebar without backdrop).

@uBlock-user uBlock-user added the something to address something to address label Mar 4, 2022
@krystian3w
Copy link
Author

krystian3w commented Mar 20, 2022

Pages started use dialogs:

uBlockOrigin/uAssets@0196844

@gorhill
Copy link
Member

gorhill commented Mar 20, 2022

@u-RraaLL See https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement, and specifically https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal.

@u-RraaLL
Copy link
Contributor

My bad. I was still on FF 97.0.2 and wasn't affected.

@peace2000
Copy link
Member

peace2000 commented Apr 20, 2023

If I understood this issue correctly, the same behavior can be seen on this link:

https://en-us.topographic-map.com/map-vx51/San-Francisco/?center=37.90303%2C-121.83254&zoom=12

The picker won't become visible. Caused by GDPR dialog.

@pajot
Copy link

pajot commented May 10, 2023

I see similar behaviour with a consent dialog at https://computerbase.de.

My workaround is to manually enter a filter rule that blocks dialogs, like so:

! computerbase is using dialog elements to prevent element picker from working
computerbase.de##dialog

The funny thing about this is that using a dialog element makes blocking the whole consent mechanism much cleaner and easier. But it would be nice if the element picker could handle it.

(Of course, blocking all dialog elements is an extreme solution and not an option if the site uses dialogs for anything that's actually useful to the user, but the filter can be made more granular with class designators.)

@krystian3w
Copy link
Author

krystian3w commented May 10, 2023

but the filter can be made more granular with class designators

Worse as they will drive us into a corner when the attribute name is not stable and the value is - not everyone has yet learned to use :matches-attr and not everyone reads the wiki.

@krystian3w krystian3w changed the title Element picker can be covered by native dialog pop-ups Element picker can be covered by native <dialog> pop-ups Sep 8, 2023
@u-RraaLL
Copy link
Contributor

u-RraaLL commented Jun 1, 2024

@krystian3w
Copy link
Author

krystian3w commented Jun 2, 2024

Popover also is danger:

test: https://gistcdn.githack.com/krystian3w/4ebb7b77634d94a9b2f7238dcee32947/raw/index2.html

(On the plus side of the attribution is the requirement for a genuine click (only someone needs to check that they detect fake clicks in JS - if there is no detection of whether the user has clicked, I would equate it with the dialogue tag))

@krystian3w krystian3w changed the title Element picker can be covered by native <dialog> pop-ups Element picker can be covered by native <dialog> / [popover] pop-ups Jun 2, 2024
@eternal-sorrow
Copy link

eternal-sorrow commented Jul 6, 2024

If the dialog is modal (shown with .showModal()), then blocking it with uBlock doesn't help. The dialog doesn't show up, but the page becomes non-interactive. You can scroll, but cannot interact with it, and certainly cannot use the element picker.

@dftf-stu

This comment was marked as off-topic.

@peace2000
Copy link
Member

peace2000 commented Nov 19, 2024

@dftf-stu Concerning that matter, please open a separate discussion thread here: https://github.com/uBlockOrigin/uBlock-issues/discussions

@krystian3w

This comment was marked as off-topic.

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

No branches or pull requests

8 participants