File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
src/vs/workbench/contrib/files/browser/views Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -569,15 +569,17 @@ export class ExplorerView extends ViewPane implements IExplorerView {
569
569
const stat = e . element ;
570
570
let anchor = e . anchor ;
571
571
572
- // Compressed folders
573
- if ( stat ) {
574
- const controller = this . renderer . getCompressedNavigationController ( stat ) ;
575
-
576
- if ( controller ) {
577
- if ( e . browserEvent instanceof KeyboardEvent || isCompressedFolderName ( e . browserEvent . target ) ) {
578
- anchor = controller . labels [ controller . index ] ;
579
- } else {
580
- controller . last ( ) ;
572
+ // Adjust for compressed folders (except when mouse is used)
573
+ if ( DOM . isHTMLElement ( anchor ) ) {
574
+ if ( stat ) {
575
+ const controller = this . renderer . getCompressedNavigationController ( stat ) ;
576
+
577
+ if ( controller ) {
578
+ if ( e . browserEvent instanceof KeyboardEvent || isCompressedFolderName ( e . browserEvent . target ) ) {
579
+ anchor = controller . labels [ controller . index ] ;
580
+ } else {
581
+ controller . last ( ) ;
582
+ }
581
583
}
582
584
}
583
585
}
You can’t perform that action at this time.
0 commit comments