File tree Expand file tree Collapse file tree
src/vs/workbench/parts/files/electron-browser/views Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -292,11 +292,11 @@ export class ExplorerView extends ViewletPanel {
292292 return ;
293293 }
294294 const selection = e . elements ;
295- const wasSelected = this . previousSelection . indexOf ( selection [ 0 ] ) >= 0 ;
296- this . previousSelection = selection ;
297- // Do not react if the user is expanding selection.
295+ // Do not react if the user is expanding selection via keyboard.
298296 // Check if the item was previously also selected, if yes the user is simply expanding / collapsing current selection #66589.
299- if ( selection . length === 1 && ! wasSelected ) {
297+ const wasSelectedAndKeyboard = ( e . browserEvent instanceof KeyboardEvent ) && this . previousSelection . indexOf ( selection [ 0 ] ) >= 0 ;
298+ this . previousSelection = selection ;
299+ if ( selection . length === 1 && ! wasSelectedAndKeyboard ) {
300300 // Do not react if user is clicking on explorer items which are input placeholders
301301 if ( ! selection [ 0 ] . name ) {
302302 // Do not react if user is clicking on explorer items which are input placeholders
You can’t perform that action at this time.
0 commit comments