Skip to content

Commit

Permalink
Palette
Browse files Browse the repository at this point in the history
Signed-off-by: CTomlyn <[email protected]>
  • Loading branch information
tomlyn committed Dec 3, 2024
1 parent 84a6c5d commit 05a3d28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -411,11 +411,11 @@ export default class KeyboardUtils {
}

static createAutoNode(evt) {
return !evt.shiftKey && evt.code === SPACE_KEY;
return !evt.shiftKey && (evt.code === SPACE_KEY || evt.code === RETURN_KEY);
}

static createAutoNodeNoLink(evt) {
return evt.shiftKey && evt.code === SPACE_KEY;
return evt.shiftKey && (evt.code === SPACE_KEY || evt.code === RETURN_KEY);
}

/* ----------------------------------------- */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ class PaletteFlyoutContentCategory extends React.Component {
this.setPaletteCategory(this.props.category.is_open);
CanvasUtils.stopPropagationAndPreventDefault(evt);

} else if (KeyboardUtils.fromCategoryToFirstNode(evt)) {
} else if (this.props.category.is_open &&
KeyboardUtils.fromCategoryToFirstNode(evt)) {
this.pclRef.current.setFirstNode();
CanvasUtils.stopPropagationAndPreventDefault(evt);
}
Expand Down

0 comments on commit 05a3d28

Please sign in to comment.