-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Question] Is there a way to identify if an element is intractable? #874
Comments
By 'in view', do you mean visible to the user, receiving input events if clicked or something else? Element can behind a (semi-transparent) overlay that has |
Ah! I understand the confusion. It would be great to have a function which could tell the state of the element. Right now we have
These states could be:
I think they will be very helpful because they would give the exact state of an element and thus allow better understanding. Even better if I could attach a listener on the page for a specific selector and it would trigger these different events as an element cycles through them. As for a specific use cases:
|
Seems like there were some discussion around this here: |
@pavelfeldman One of the other use cases here is, trying to interact with the element in page when event handlers are not registered to it yet. On this page: https://developers.google.com/web/tools/lighthouse/audits/time-to-interactive it's mentioned that I would love to have a new event |
There is no efficient way to instrument event listener addition so we won't be able to do that. Present version of |
Click free from sticky headers is fantastic. Thanks! :) Regarding event listener addition, what are the inefficient ways? haha I was unable to find anything at all in this case. For example: |
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
I can use IntersectionObserver (
elementHandle.scrollIntoViewIfNeeded()
) to understand if the element is in viewport but it doesn't help if the element is behind an overlay/dialog. Is there some function that I can use to confirm if the element that I am going to perform an action upon is actually present in the view.Something like:
page.isInView(selector/xpath)
and return theelement.boundingBox
.The text was updated successfully, but these errors were encountered: