Closed tonyketcham closed 2 years ago
Running into the same issue on Catalina.
I think this can be fixed by modifying a handful of spots that look for e.ctrlKey
so they also look for e.metaKey
. This has the knock-on effect of allowing Windows users to use the Windows
key for multi-selection, which doesn't seem like a big deal, but might not be desirable?
@alexdarling those places can be replaced with a dynamic keyboard shortcut that gets set based on the user's OS via something like:
import { detect } from 'detect-browser';
export const OS = browser.os;
export const isMacOS = OS === 'Mac OS';
// Handle device differences in keyboard key names
export const CTRL_CMD = isMacOS ? 'cmd' : 'ctrl';
This way it wouldn't introduce any side effects for Windows
Thank you for your report, and everyone who suggested ideas for fixing this! This is fixed in version 1.1.9.
I think this re-emerged with 1.1.11
. I cannot test it out as I am not on Mac, but I received report that issue is there with latest library version. In other words, it works with 1.1.10
but not the latest.
@selfrefactor hm that is odd. There weren't really any changes between 1.1.10 and 1.1.11 that had anything to do with that. I would be interested if someone with a Mac can reproduce this, unfortunately I also do not have a mac. Can you open a new issue for that?
Describe the bug On a Mac, attempting to select multiple nodes while holding down
cmd
+ clicking does not work. It seems that the Windowsctrl
key may be mapped to the maccontrol
key rather than the expectedcmd
key.Holding down
control
+ click on a Mac performs a right-click on the system level which would overpower the tree's hotkey if it is indeed usingcontrol
+ click.The only way I can select a non-contiguous set of nodes on Mac is via the keyboard when I do
control
+space
.To Reproduce Attempt to
cmd
+ click to perform a non-contiguous multi-select while using a Mac.Expected behavior
cmd
+ click should have the same effect ascontrol
+space
currently doesScreenshots Here's attempting to do this via mouse. First is holding down
cmd
while clicking, second is holdingcontrol
while clickinghttps://user-images.githubusercontent.com/43280336/171761705-fec53f3e-a0d5-445f-8337-b496f181258b.mov
Desktop (please complete the following information):