Skip to content

Commit eb9f98c

Browse files
authored
Update tree-options.model.ts
Use OSX Command key captured as 'metaKey' as an alternative control as 'ctrl + click' converts it into a right click action on OSX https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/metaKey
1 parent 614999c commit eb9f98c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

projects/angular-tree-component/src/lib/models/tree-options.model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const TREE_ACTIONS = {
2525
PREVIOUS_NODE: (tree: TreeModel, node: TreeNode, $event: any) => tree.focusPreviousNode(),
2626
MOVE_NODE: (tree: TreeModel, node: TreeNode, $event: any, {from , to}: {from: any, to: any}) => {
2727
// default action assumes from = node, to = {parent, index}
28-
if ($event.ctrlKey) {
28+
if ($event.ctrlKey || $event.metaKey) {
2929
tree.copyNode(from, to);
3030
} else {
3131
tree.moveNode(from, to);

0 commit comments

Comments
 (0)