Skip to content

Commit ab90467

Browse files
committed
calling instead hide widgets when we know we are not resizing
1 parent a28db3e commit ab90467

File tree

1 file changed

+9
-8
lines changed
  • src/vs/editor/contrib/hover/browser

1 file changed

+9
-8
lines changed

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,9 @@ export class ModesHoverController implements IEditorContribution {
122122
if (target.type !== MouseTargetType.OVERLAY_WIDGET) {
123123
this._hoverClicked = false;
124124
}
125-
126-
this._hideWidgets();
125+
if (!this._contentWidget?.widget.isResizing) {
126+
this._hideWidgets();
127+
}
127128
}
128129

129130
private _onEditorMouseUp(mouseEvent: IEditorMouseEvent): void {
@@ -132,7 +133,8 @@ export class ModesHoverController implements IEditorContribution {
132133

133134
private _onEditorMouseLeave(mouseEvent: IPartialEditorMouseEvent): void {
134135
const targetEm = (mouseEvent.event.browserEvent.relatedTarget) as HTMLElement;
135-
if (this._contentWidget?.containsNode(targetEm)) {
136+
if (this._contentWidget?.widget.isResizing || this._contentWidget?.containsNode(targetEm)) {
137+
// When the content widget is resizing
136138
// when the mouse is inside hover widget
137139
return;
138140
}
@@ -195,8 +197,9 @@ export class ModesHoverController implements IEditorContribution {
195197
this._glyphWidget.startShowingAt(target.position.lineNumber);
196198
return;
197199
}
198-
199-
this._hideWidgets();
200+
if (!this._contentWidget?.widget.isResizing) {
201+
this._hideWidgets();
202+
}
200203
}
201204

202205
private _onKeyDown(e: IKeyboardEvent): void {
@@ -222,9 +225,7 @@ export class ModesHoverController implements IEditorContribution {
222225

223226
this._hoverClicked = false;
224227
this._glyphWidget?.hide();
225-
if (!this._contentWidget?.widget.isResizing) {
226-
this._contentWidget?.hide();
227-
}
228+
this._contentWidget?.hide();
228229
}
229230

230231
private _getOrCreateContentWidget(): ContentHoverController {

0 commit comments

Comments
 (0)