Skip to content

Commit 0ccb215

Browse files
committed
making stole focus also check whether the hover focused key is set to true
1 parent e44296c commit 0ccb215

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,12 +726,15 @@ export class ContentHoverWidget extends ResizableContentWidget {
726726
if (!this._visibleData) {
727727
return;
728728
}
729+
const stoleFocus = this._visibleData.stoleFocus || this._hoverFocusedKey.get();
729730
this._setHoverData(undefined);
730731
this._resizableNode.maxSize = new dom.Dimension(Infinity, Infinity);
731732
this._resizableNode.clearSashHoverState();
732733
this._hoverFocusedKey.set(false);
733734
this._editor.layoutContentWidget(this);
734-
this._editor.focus();
735+
if (stoleFocus) {
736+
this._editor.focus();
737+
}
735738
}
736739

737740
private _removeConstraintsRenderNormally(): void {

0 commit comments

Comments
 (0)