Skip to content

Commit fbdd2b7

Browse files
authored
Merge pull request microsoft#188389 from microsoft/aiday/hoverPlacementProblem
Incorrect placement of hover
2 parents 3f20370 + 5b98372 commit fbdd2b7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/vs/editor/contrib/hover/browser/contentHover.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,10 @@ export class ContentHoverWidget extends ResizableContentWidget {
791791
this._adjustContentsBottomPadding();
792792
this._adjustHoverHeightForScrollbar(height);
793793
}
794+
if (this._visibleData?.showAtPosition) {
795+
const widgetHeight = dom.getTotalHeight(this._hover.containerDomNode);
796+
this._positionPreference = this._findPositionPreference(widgetHeight, this._visibleData.showAtPosition);
797+
}
794798
this._layoutContentWidget();
795799
}
796800

0 commit comments

Comments
 (0)