-
-
Notifications
You must be signed in to change notification settings - Fork 647
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
Overlay path covering element to highlight when outside of the initial window #1984
Comments
@cmazereau do you have a reproduction? I am not seeing this issue on https://shepherdjs.dev/ |
On https://shepherdjs.dev/, it seems that the issue does not reproduce because no |
@cmazereau gotcha, if you have a fix in mind, would you mind opening a PR? |
@rwwagner90 I don't have a satisfying fix just yet; I'm still trying to understand what exactly causes this behavior (after further investigation, it seems more complicated than I initially thought). |
I had a little bit of time to look into this today, and found out that the problematic behavior happens when :
In this case, the height property should, from my understanding, behave as "auto" (cf https://www.w3.org/TR/CSS2/visudet.html#propdef-height). |
@cmazereau sounds like a possible browser limitation or bug? |
@rwwagner90 I'm not sure it's a bug or a browser limitation, since I have the same behavior on 3 different browsers:
|
When an element to highlight is outside of the initial window (and needs to be scrolled to), the overlay covers this element.
It appears that the svg path of the overlay is calculated using
_getVisibleHeight()
, which returns 0 in that case.This seems to be due to the fact that
_getVisibleHeight()
usesscrollParent.getBoundingClientRect()
, without takingwindow.scrollY
into account. The modification of_getVisibleHeight()
as follow seems to resolve the issue :The text was updated successfully, but these errors were encountered: