mirror of
https://github.com/karl0ss/homepage.git
synced 2025-04-29 12:03:41 +01:00
Fix quicklaunch should only open for text keys (#2044)
This commit is contained in:
parent
46477dac0c
commit
6b8c02cf2a
@ -220,7 +220,7 @@ function Home({ initialSettings }) {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
function handleKeyDown(e) {
|
function handleKeyDown(e) {
|
||||||
if (e.target.tagName === "BODY" || e.target.id === "inner_wrapper") {
|
if (e.target.tagName === "BODY" || e.target.id === "inner_wrapper") {
|
||||||
if (e.key.match(/(\w|\s)/g) && !(e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || e.code === "Tab")) {
|
if (e.key.length === 1 && e.key.match(/(\w|\s)/g) && !(e.altKey || e.ctrlKey || e.metaKey || e.shiftKey)) {
|
||||||
setSearching(true);
|
setSearching(true);
|
||||||
} else if (e.key === "Escape") {
|
} else if (e.key === "Escape") {
|
||||||
setSearchString("");
|
setSearchString("");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user