vscode
vscode copied to clipboard
Fix the unexpected position of hover widgets
fix #205353
Description
This is a brief explanation of the changes.
The original code https://github.com/microsoft/vscode/blob/11095a2781bd2a14cbaddc1b925f196f1e9452bc/src/vs/editor/browser/widget/hoverWidget/hoverWidget.ts#L334-L337 will select a bound like this:
which will position the hover widget at the top-left corner of the bound. And this will make the link in the widget impossible to reach for the mouse.
The changed code
const { top, right, bottom, left } = targetBounds[0];
will select a bound like this:
which makes the widget reachable.
Effect
Before
After