uBlockOrigin / uBlock-issues

This is the community-maintained issue tracker for uBlock Origin
https://github.com/gorhill/uBlock
951 stars 82 forks source link

Element picker can be covered by native `<dialog>` / `[popover]` pop-ups #2027

Open krystian3w opened 2 years ago

krystian3w commented 2 years ago

Prerequisites

I tried to reproduce the issue when...

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:

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 commented 2 years ago

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

krystian3w commented 2 years ago

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).

krystian3w commented 2 years ago

Pages started use dialogs:

https://github.com/uBlockOrigin/uAssets/commit/0196844770969c05b586943be79faa3a6d36ddbf

gorhill commented 2 years ago

@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 commented 2 years ago

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

peace2000 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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.

u-RraaLL commented 6 months ago

Another case: https://www.reddit.com/r/uBlockOrigin/comments/1d5wpjl/cant_use_ublock_on_a_website/

krystian3w commented 6 months ago

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))

eternal-sorrow commented 4 months ago

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 commented 1 week ago

Hi. Apologies if this isn't related (though it is somewhat similar, and for some-reason I cannot create a new ticket on this site as it says the owner hasn't granted permission) but... could a countdown-timer mode be added to the Element Picker?

I'm unsure otherwise how to block "hover-over" type elements, and on some websites I accidentally mouse-over some elements and they take too-long to disappear. Could a countdown be added, similar to the Windows "Snipping Tool" where after 10 seconds it would then dim the site and keep any hover-over elements in-place so they can be selected?

Thanks

peace2000 commented 1 week ago

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

krystian3w commented 1 week ago

Simple hover possible delay/froze by browser devtools, harder like on Apple web pages need script to generate "hover" action in DOM.

MasterKia commented 2 days ago

Not sure if this is completely related but when visiting zoomit.ir, there's a popup that prevents modifying the text inside the element picker but the buttons and sliders still and work.

https://github.com/user-attachments/assets/ef933450-883e-40b6-980c-2b5727650660

After closing the popup the issue goes away.

gorhill commented 2 days ago

The page is constantly calling code with a setTimeout with a delay of 0, not sure what it's doing but this removes the issue:

zoomit.ir##+js(prevent-setTimeout, addEventProcessor)