@@ -155,7 +155,7 @@ export class ModesHoverController implements IEditorContribution {
155155 private _onEditorMouseMove ( mouseEvent : IEditorMouseEvent ) : void {
156156 const target = mouseEvent . target ;
157157
158- if ( this . _contentWidget ?. isFocused ( ) || this . _contentWidget ?. widget . isResizing ) {
158+ if ( this . _contentWidget ?. isFocused || this . _contentWidget ?. isResizing ) {
159159 return ;
160160 }
161161
@@ -175,7 +175,7 @@ export class ModesHoverController implements IEditorContribution {
175175
176176 if (
177177 ! this . _isHoverSticky && target . type === MouseTargetType . CONTENT_WIDGET && target . detail === ContentHoverWidget . ID
178- && this . _contentWidget ?. isColorPickerVisible ( )
178+ && this . _contentWidget ?. isColorPickerVisible
179179 ) {
180180 // though the hover is not sticky, the color picker needs to.
181181 return ;
@@ -186,7 +186,7 @@ export class ModesHoverController implements IEditorContribution {
186186 return ;
187187 }
188188
189- if ( this . _isHoverSticky && this . _contentWidget ?. isVisibleFromKeyboard ( ) ) {
189+ if ( this . _isHoverSticky && this . _contentWidget ?. isVisibleFromKeyboard ) {
190190 // Sticky mode is on and the hover has been shown via keyboard
191191 // so moving the mouse has no effect
192192 return ;
@@ -233,7 +233,7 @@ export class ModesHoverController implements IEditorContribution {
233233
234234 const resolvedKeyboardEvent = this . _keybindingService . softDispatch ( e , this . _editor . getDomNode ( ) ) ;
235235 // If the beginning of a multi-chord keybinding is pressed, or the command aims to focus the hover, set the variable to true, otherwise false
236- const mightTriggerFocus = ( resolvedKeyboardEvent . kind === ResultKind . MoreChordsNeeded || ( resolvedKeyboardEvent . kind === ResultKind . KbFound && resolvedKeyboardEvent . commandId === 'editor.action.showHover' && this . _contentWidget ?. isVisible ( ) ) ) ;
236+ const mightTriggerFocus = ( resolvedKeyboardEvent . kind === ResultKind . MoreChordsNeeded || ( resolvedKeyboardEvent . kind === ResultKind . KbFound && resolvedKeyboardEvent . commandId === 'editor.action.showHover' && this . _contentWidget ?. isVisible ) ) ;
237237
238238 if ( e . keyCode !== KeyCode . Ctrl && e . keyCode !== KeyCode . Alt && e . keyCode !== KeyCode . Meta && e . keyCode !== KeyCode . Shift
239239 && ! mightTriggerFocus ) {
@@ -246,7 +246,7 @@ export class ModesHoverController implements IEditorContribution {
246246 if ( _sticky ) {
247247 return ;
248248 }
249- if ( ( this . _isMouseDown && this . _hoverClicked && this . _contentWidget ?. isColorPickerVisible ( ) ) || InlineSuggestionHintsContentWidget . dropDownVisible ) {
249+ if ( ( this . _isMouseDown && this . _hoverClicked && this . _contentWidget ?. isColorPickerVisible ) || InlineSuggestionHintsContentWidget . dropDownVisible ) {
250250 return ;
251251 }
252252 this . _hoverActivatedByColorDecoratorClick = false ;
@@ -262,10 +262,6 @@ export class ModesHoverController implements IEditorContribution {
262262 return this . _contentWidget ;
263263 }
264264
265- public isColorPickerVisible ( ) : boolean {
266- return this . _contentWidget ?. isColorPickerVisible ( ) || false ;
267- }
268-
269265 public showContentHover ( range : Range , mode : HoverStartMode , source : HoverStartSource , focus : boolean , activatedByColorDecoratorClick : boolean = false ) : void {
270266 this . _hoverActivatedByColorDecoratorClick = activatedByColorDecoratorClick ;
271267 this . _getOrCreateContentWidget ( ) . startShowingAtRange ( range , mode , source , focus ) ;
@@ -307,8 +303,12 @@ export class ModesHoverController implements IEditorContribution {
307303 this . _contentWidget ?. goToBottom ( ) ;
308304 }
309305
310- public isHoverVisible ( ) : boolean | undefined {
311- return this . _contentWidget ?. isVisible ( ) ;
306+ get isColorPickerVisible ( ) : boolean | undefined {
307+ return this . _contentWidget ?. isColorPickerVisible ;
308+ }
309+
310+ get isHoverVisible ( ) : boolean | undefined {
311+ return this . _contentWidget ?. isVisible ;
312312 }
313313
314314 public dispose ( ) : void {
@@ -372,7 +372,7 @@ class ShowOrFocusHoverAction extends EditorAction {
372372 const range = new Range ( position . lineNumber , position . column , position . lineNumber , position . column ) ;
373373 const focus = editor . getOption ( EditorOption . accessibilitySupport ) === AccessibilitySupport . Enabled || ! ! args ?. focus ;
374374
375- if ( controller . isHoverVisible ( ) ) {
375+ if ( controller . isHoverVisible ) {
376376 controller . focus ( ) ;
377377 } else {
378378 controller . showContentHover ( range , HoverStartMode . Immediate , HoverStartSource . Keyboard , focus ) ;
0 commit comments