-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Removed double-click handler that caused folders to auto-open (#15868) #15869
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Hi @kachurun, thanks for your contribution! I converted the Pull Request to a draft until you can address these issues. This facilitates our work to triage the opened pull requests. |
Removed double-click handler that caused folders to auto-open (eclipse-theia#15868)
Oh yes, my bad - it was a bad idea to remove dbl click handler handler, since it could be used in classes that extend TreeWidget. I’ve brought this method back and removed only the openNode call. Now it's only one line of code changed - can't imagine what could go wrong with lints (it compiles successfully locally). The Eclipse Foundation contributor agreement was signed off by me. |
@@ -1378,7 +1378,6 @@ export class TreeWidget extends ReactWidget implements StatefulWidget { | |||
* @param event the double-click mouse event. | |||
*/ | |||
protected handleDblClickEvent(node: TreeNode | undefined, event: React.MouseEvent<HTMLElement>): void { | |||
this.model.openNode(node); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will turn off double click handling for all nodes in all tree widgets. This is not what we want. Also, in general, one does not know what adopters might want to do upon double click on parent items.
The right place to fix this, IMO, would be in the FileNavigatorModel
or FileTreeMode
, overriding doOpen()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please tell me how to find the place where a double-click should open the tree (and a single click doesn't do that)?
I even found some settings for how to open trees with a single or double click, but they don't have any effect in any of the places I tested.
And we have the same bug in the user settings section, for example, and in other places, I guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tree delegates opening the node to its model. The model is different for different tree widgets. The model used in the navigator view is called `FileNavigatorModel".
Removed double-click handler that caused folders to auto-open after close
What it does
Check this issue (#15868)
How to test
Check this issue (#15868)
Follow-ups
Breaking changes
Attribution
Review checklist
Reminder for reviewers