Skip to content

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kachurun
Copy link
Contributor

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

  • This PR introduces breaking changes and requires careful review. If yes, the breaking changes section in the changelog has been updated.

Attribution

Review checklist

Reminder for reviewers

@github-project-automation github-project-automation bot moved this to Waiting on reviewers in PR Backlog Jun 23, 2025
@rschnekenbu
Copy link
Contributor

rschnekenbu commented Jun 24, 2025

Hi @kachurun, thanks for your contribution!
In order to be reviewed and accepted, it would need at least to pass the linting, the Eclipse Foundation contributor agreement to be signed by you, and that project still compiles.
You will find some information here: https://github.com/eclipse-theia/theia/blob/master/CONTRIBUTING.md

I converted the Pull Request to a draft until you can address these issues. This facilitates our work to triage the opened pull requests.

@rschnekenbu rschnekenbu marked this pull request as draft June 24, 2025 09:43
Removed double-click handler that caused folders to auto-open (eclipse-theia#15868)
@kachurun kachurun marked this pull request as ready for review June 24, 2025 17:47
@kachurun
Copy link
Contributor Author

@rschnekenbu

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);
Copy link
Member

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()

Copy link
Contributor Author

@kachurun kachurun Jun 25, 2025

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.

Copy link
Member

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".

@github-project-automation github-project-automation bot moved this from Waiting on reviewers to Waiting on author in PR Backlog Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Waiting on author
Development

Successfully merging this pull request may close these issues.

3 participants