Skip to content

Commit e2dc70e

Browse files
authored
trees: always handle an twistie events by the tree if it changes collapsed state (microsoft#209090)
This allows preserving your multi-selection while expanding/collapsing other nodes in the tree. I think this is a good overall change to make across our UI. E.g. similarly, without this change, you can't expand a folder in the Explorer view without losing your selection state. cc @joaomoreno Fixes microsoft#208852
1 parent 86bf11f commit e2dc70e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vs/base/browser/ui/tree/abstractTree.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2295,7 +2295,7 @@ class TreeNodeListMouseController<T, TFilterData, TRef> extends MouseController<
22952295
this.tree.setFocus([location]);
22962296
this.tree.toggleCollapsed(location, recursive);
22972297

2298-
if (expandOnlyOnTwistieClick && onTwistie) {
2298+
if (onTwistie) {
22992299
// Do not set this before calling a handler on the super class, because it will reject it as handled
23002300
e.browserEvent.isHandledByList = true;
23012301
return;

0 commit comments

Comments
 (0)