File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
src/webui/www/private/scripts Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -2460,11 +2460,22 @@ window.qBittorrent.DynamicTable ??= (() => {
24602460 return ;
24612461
24622462 const node = this . getNode ( id ) ;
2463- if ( node . isFolder ) {
2463+ if ( node . isFolder && ! this . isCollapsed ( node . rowId ) ) {
24642464 this . collapseNode ( node . rowId ) ;
24652465 if ( this . useVirtualList )
24662466 this . rerender ( ) ;
2467+ return ;
24672468 }
2469+
2470+ // when node is already collapsed or is a file, select parent
2471+ const parent = node . root ;
2472+ if ( ( parent === null ) || ( parent . rowId === null ) )
2473+ return ;
2474+
2475+ const parentRowId = parent . rowId . toString ( ) ;
2476+ this . deselectAll ( ) ;
2477+ this . selectRow ( parentRowId ) ;
2478+ this . getTrByRowId ( parentRowId ) ?. focus ( { preventScroll : true } ) ;
24682479 }
24692480
24702481 isAllCheckboxesChecked ( ) {
You can’t perform that action at this time.
0 commit comments