@@ -452,7 +452,6 @@ abstract class ResourceNavigator<T> extends Disposable {
452452 super ( ) ;
453453
454454 this . openOnFocus = options ?. openOnFocus ?? false ;
455- this . openOnSingleClick = options ?. openOnSingleClick ?? true ;
456455
457456 this . _register ( Event . filter ( this . widget . onDidChangeSelection , e => e . browserEvent instanceof KeyboardEvent ) ( e => this . onSelectionFromKeyboard ( e ) ) ) ;
458457 this . _register ( this . widget . onPointer ( ( e : { browserEvent : MouseEvent } ) => this . onPointer ( e . browserEvent ) ) ) ;
@@ -463,9 +462,12 @@ abstract class ResourceNavigator<T> extends Disposable {
463462 }
464463
465464 if ( typeof options ?. openOnSingleClick !== 'boolean' && options ?. configurationService ) {
465+ this . openOnSingleClick = options ?. configurationService ! . getValue ( openModeSettingKey ) !== 'doubleClick' ;
466466 this . _register ( options ?. configurationService . onDidChangeConfiguration ( ( ) => {
467467 this . openOnSingleClick = options ?. configurationService ! . getValue ( openModeSettingKey ) !== 'doubleClick' ;
468468 } ) ) ;
469+ } else {
470+ this . openOnSingleClick = options ?. openOnSingleClick ?? true ;
469471 }
470472 }
471473
@@ -493,15 +495,19 @@ abstract class ResourceNavigator<T> extends Disposable {
493495 }
494496
495497 private onPointer ( browserEvent : MouseEvent ) : void {
498+ if ( ! this . openOnSingleClick ) {
499+ return ;
500+ }
501+
496502 const isDoubleClick = browserEvent . detail === 2 ;
497503
498- if ( ! this . openOnSingleClick && ! isDoubleClick ) {
504+ if ( isDoubleClick ) {
499505 return ;
500506 }
501507
502508 const isMiddleClick = browserEvent . button === 1 ;
503- const preserveFocus = ! isDoubleClick ;
504- const pinned = isDoubleClick || isMiddleClick ;
509+ const preserveFocus = true ;
510+ const pinned = isMiddleClick ;
505511 const sideBySide = browserEvent . ctrlKey || browserEvent . metaKey || browserEvent . altKey ;
506512
507513 this . _open ( preserveFocus , pinned , sideBySide , browserEvent ) ;
0 commit comments