Skip to content
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

Fix check for Cmd+Click on MacOS for Trees #10883

Conversation

colin-grant-work
Copy link
Contributor

What it does

Fixes #10876 by ensuring that on MacOS, we check for meta and not ctrl when handling clicks in the tree widget.

How to test

  1. On MacOS
  2. Open the navigator
  3. Select a node
  4. Cmd+click on another node
  5. Observe that the second node is selected and the first remains selected.
  6. Ctrl+click on a third node
  7. Observe that the third node is selected, the first two nodes are not selected, and the context menu is displayed with a rename option.

Review checklist

Reminder for reviewers

@colin-grant-work colin-grant-work added bug bugs found in the application OS/Mac issues related to Mac OS tree issues related to the tree (ex: tree widget) labels Mar 14, 2022
@vince-fugnitto vince-fugnitto self-requested a review March 15, 2022 12:52
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good to me 👍

I confirmed that:

  • cmd + click works well on macOS - allows multiple selections
  • ctrl + click works well on macOS - any previous selection is reset
  • ctrl + click works well on Linux - allows multiple selections

Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ternary looks better ;)

@colin-grant-work colin-grant-work merged commit f7f2569 into eclipse-theia:master Mar 15, 2022
@colin-grant-work colin-grant-work added this to the 1.24.0 milestone Mar 15, 2022
@colin-grant-work colin-grant-work deleted the bugfix/macos-ctrl-in-trees branch March 15, 2022 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application OS/Mac issues related to Mac OS tree issues related to the tree (ex: tree widget)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MacOS: Incorrect modifier key handling on click
2 participants