@@ -46,8 +46,6 @@ interface IHoverSettings {
46
46
47
47
interface IHoverState {
48
48
mouseDown : boolean ;
49
- // TODO @aiday -mar maybe not needed, investigate this
50
- contentHoverFocused : boolean ;
51
49
activatedByDecoratorClick : boolean ;
52
50
}
53
51
@@ -66,7 +64,6 @@ export class HoverController extends Disposable implements IEditorContribution {
66
64
private _hoverSettings ! : IHoverSettings ;
67
65
private _hoverState : IHoverState = {
68
66
mouseDown : false ,
69
- contentHoverFocused : false ,
70
67
activatedByDecoratorClick : false
71
68
} ;
72
69
@@ -146,7 +143,6 @@ export class HoverController extends Disposable implements IEditorContribution {
146
143
147
144
if ( target . type === MouseTargetType . CONTENT_WIDGET && target . detail === ContentHoverWidget . ID ) {
148
145
// mouse down on top of content hover widget
149
- this . _hoverState . contentHoverFocused = true ;
150
146
return ;
151
147
}
152
148
@@ -155,10 +151,6 @@ export class HoverController extends Disposable implements IEditorContribution {
155
151
return ;
156
152
}
157
153
158
- if ( target . type !== MouseTargetType . OVERLAY_WIDGET ) {
159
- this . _hoverState . contentHoverFocused = false ;
160
- }
161
-
162
154
if ( this . _contentWidget ?. widget . isResizing ) {
163
155
return ;
164
156
}
@@ -232,9 +224,6 @@ export class HoverController extends Disposable implements IEditorContribution {
232
224
if ( this . _contentWidget ?. isFocused || this . _contentWidget ?. isResizing ) {
233
225
return ;
234
226
}
235
- if ( this . _hoverState . mouseDown && this . _hoverState . contentHoverFocused ) {
236
- return ;
237
- }
238
227
const sticky = this . _hoverSettings . sticky ;
239
228
if ( sticky && this . _contentWidget ?. isVisibleFromKeyboard ) {
240
229
// Sticky mode is on and the hover has been shown via keyboard
@@ -348,18 +337,13 @@ export class HoverController extends Disposable implements IEditorContribution {
348
337
if ( _sticky ) {
349
338
return ;
350
339
}
351
- if (
352
- (
353
- this . _hoverState . mouseDown
354
- && this . _hoverState . contentHoverFocused
355
- && this . _contentWidget ?. isColorPickerVisible
356
- )
357
- || InlineSuggestionHintsContentWidget . dropDownVisible
358
- ) {
340
+ if ( (
341
+ this . _hoverState . mouseDown
342
+ && this . _contentWidget ?. isColorPickerVisible
343
+ ) || InlineSuggestionHintsContentWidget . dropDownVisible ) {
359
344
return ;
360
345
}
361
346
this . _hoverState . activatedByDecoratorClick = false ;
362
- this . _hoverState . contentHoverFocused = false ;
363
347
this . _glyphWidget ?. hide ( ) ;
364
348
this . _contentWidget ?. hide ( ) ;
365
349
}
0 commit comments