fix bug in show-hints inset #14287
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "github/fork/alirrah/hints-inset-position"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When the show-hints box does not have space to be displayed below, the box will be displayed in the wrong place, which is also reported in this issue. I fixed this issue by making some changes, which you can see in the videos below.
The reason I added
marginBottomis so that I can give the box some space from the bottom (I didn't want the box to stick to the bottom of the page).before:
vokoscreenNG-2025-06-24_09-52-21.webm
after:
vokoscreenNG-2025-06-24_09-49-06.webm
Do you have a minimal HTML page that shows the current issue happening? My response to the issue you linked suggests I haven't been able reproduce the issue.
You can see the error at the link below:
https://codesandbox.io/p/sandbox/wcndgs
As can be seen in line 272, the value of offsetTop should be subtracted from top, whereas in line 294 it has been added.
I can confirm that that plus should be a minus. I've corrected that in attached patch. I don't think adding an option like
marginBottomis a good idea—firstly, it suggests we'd also needmarginTop,marginLeft, andmarginRight, and secondly, I don't think your implementation, as it stands, properly implements a bottom margin (just blindly moving the tooltip up will cause all the other computations to work with the wrong position). As such, I don't intend to merge that part, and suggest you work with something like transparent borders around the tooltip to get an effect like this.Pull request closed