Fix the unexpected position of hover widgets #205502
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix #184740
fix #205353
Description
This is a brief explanation of the changes.
The original code
vscode/src/vs/editor/browser/widget/hoverWidget/hoverWidget.ts
Lines 334 to 337 in 11095a2
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
will select a bound like this:
which makes the widget reachable.
Effect
Before
After