Skip to content

Commit

Permalink
Merge pull request microsoft#205502 from NriotHrreion/fix-205353
Browse files Browse the repository at this point in the history
Fix the unexpected position of hover widgets
  • Loading branch information
Tyriar authored Feb 23, 2024
2 parents 8a64f0f + 1cc9ae4 commit 1e07343
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/vs/editor/browser/services/hoverService/hoverWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,7 @@ export class HoverWidget extends Widget implements IHoverWidget {
};

const targetBounds = this._target.targetElements.map(e => getZoomAccountedBoundingClientRect(e));
const top = Math.min(...targetBounds.map(e => e.top));
const right = Math.max(...targetBounds.map(e => e.right));
const bottom = Math.max(...targetBounds.map(e => e.bottom));
const left = Math.min(...targetBounds.map(e => e.left));
const { top, right, bottom, left } = targetBounds[0];
const width = right - left;
const height = bottom - top;

Expand Down

0 comments on commit 1e07343

Please sign in to comment.