-
Notifications
You must be signed in to change notification settings - Fork 238
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
Hovering over flamegraph in sandwich view causes label to get cut off #256
Comments
I made a small, hacky userscript to solve the issue on speedscope.app (obviously will break when css gets regenerated) https://gist.githubusercontent.com/nightpool/6a3d5218436295c6fafa991d30409f5a/raw/speedscope_tooltip_fix.user.css |
Oh jeez, good catch. This is definitely a bug. I'd accept a PR to fix this issue. I agree that having it clipped by the container isn't great, but it seems like there's something wrong with the heuristic deciding whether the tip should be to the left or the right of the cursor. I suspect that fixing that will fix the problem in the majority of cases. (e.g. in the screenshot you show, the problem would be resolved if the tooltip was to the right of the cursor instead of left). |
This changes the HoverTip placement logic to use measurements from the actual DOM node rather than basing everything on the maximum sizes. This avoids some counter-intuitive behaviour, most importantly situations where the label would overflow off the left side of the screen for no obvious reason. Fixes #394 Fixes #256
This changes the HoverTip placement logic to use measurements from the actual DOM node rather than basing everything on the maximum sizes. This avoids some counter-intuitive behaviour, most importantly situations where the label would overflow off the left side of the screen for no obvious reason. Fixes jlfwong#394 Fixes jlfwong#256
Actual behavior:
Expected behavior:
Seems like the issue is caused by some overly-strict
overflow: hidden
styles on the containing blocks. Maybe it would be better to use a Portal to render the tooltip into a part of the dom that doesn't haveoverflow: none
applied? Or remove the overflow: hidden stylesThe text was updated successfully, but these errors were encountered: