diff --git a/src/main/js/components/command-palette/index.js b/src/main/js/components/command-palette/index.js index 5ece1106aed0..7c8041b50007 100644 --- a/src/main/js/components/command-palette/index.js +++ b/src/main/js/components/command-palette/index.js @@ -32,6 +32,8 @@ function init() { searchResultsContainer, () => searchResults.querySelectorAll("a"), hoverClass, + () => {}, + () => commandPalette.open, ); // Events diff --git a/src/main/js/util/keyboard.js b/src/main/js/util/keyboard.js index 88d677530416..11c414b6a5da 100644 --- a/src/main/js/util/keyboard.js +++ b/src/main/js/util/keyboard.js @@ -81,7 +81,7 @@ export default function makeKeyboardNavigable( } function scrollAndSelect(selectedItem, selectedClass, items) { - if (selectedItem !== null) { + if (selectedItem) { if (!isInViewport(selectedItem)) { selectedItem.scrollIntoView(false); }