@@ -167,6 +167,7 @@ export class CodeActionMenu extends Disposable implements IEditorContribution {
167
167
private currSelectedItem : number | undefined ;
168
168
private hasSeparator : boolean = false ;
169
169
private block ?: HTMLElement ;
170
+ private pointerBlock ?: HTMLElement ;
170
171
171
172
public static readonly documentationID : string = '_documentation' ;
172
173
@@ -283,6 +284,21 @@ export class CodeActionMenu extends Disposable implements IEditorContribution {
283
284
} , [ this . listRenderer ] , { keyboardSupport : false }
284
285
) ;
285
286
287
+ const pointerBlockDiv = document . createElement ( 'div' ) ;
288
+ this . pointerBlock = element . appendChild ( pointerBlockDiv ) ;
289
+ this . pointerBlock . classList . add ( 'context-view-pointerBlock' ) ;
290
+ this . pointerBlock . style . position = 'fixed' ;
291
+ this . pointerBlock . style . cursor = 'initial' ;
292
+ this . pointerBlock . style . left = '0' ;
293
+ this . pointerBlock . style . top = '0' ;
294
+ this . pointerBlock . style . width = '100%' ;
295
+ this . pointerBlock . style . height = '100%' ;
296
+ this . pointerBlock . style . zIndex = '2' ;
297
+
298
+ // Removes block on click INSIDE widget or ANY mouse movement
299
+ renderDisposables . add ( dom . addDisposableListener ( this . pointerBlock , dom . EventType . POINTER_MOVE , ( ) => this . pointerBlock ?. remove ( ) ) ) ;
300
+ renderDisposables . add ( dom . addDisposableListener ( this . pointerBlock , dom . EventType . MOUSE_DOWN , ( ) => this . pointerBlock ?. remove ( ) ) ) ;
301
+
286
302
renderDisposables . add ( this . codeActionList . value . onMouseClick ( e => this . _onListClick ( e ) ) ) ;
287
303
renderDisposables . add ( this . codeActionList . value . onMouseOver ( e => this . _onListHover ( e ) ) ) ;
288
304
renderDisposables . add ( this . codeActionList . value . onDidChangeFocus ( e => this . codeActionList . value ?. domFocus ( ) ) ) ;
0 commit comments