mirror of
https://github.com/gethomepage/homepage.git
synced 2026-09-29 07:21:16 -07:00
Tweak: handle QL selection without hover (#7105)
Release Drafter / Auto Label PR (push) Has been cancelled
Docker CI / Docker Build & Push (push) Has been cancelled
Lint / Linting Checks (push) Has been cancelled
Release Drafter / Update Release Draft (push) Has been cancelled
Tests / vitest (1) (push) Has been cancelled
Tests / vitest (2) (push) Has been cancelled
Tests / vitest (3) (push) Has been cancelled
Tests / vitest (4) (push) Has been cancelled
Release Drafter / Auto Label PR (push) Has been cancelled
Docker CI / Docker Build & Push (push) Has been cancelled
Lint / Linting Checks (push) Has been cancelled
Release Drafter / Update Release Draft (push) Has been cancelled
Tests / vitest (1) (push) Has been cancelled
Tests / vitest (2) (push) Has been cancelled
Tests / vitest (3) (push) Has been cancelled
Tests / vitest (4) (push) Has been cancelled
This commit is contained in:
@@ -124,8 +124,8 @@ export default function QuickLaunch({ servicesAndBookmarks, searchString, setSea
|
||||
? MOBILE_BUTTON_POSITIONS[settings.quicklaunch.mobileButtonPosition]
|
||||
: null;
|
||||
|
||||
function openCurrentItem(newWindow) {
|
||||
const result = results[activeItemIndex];
|
||||
function openCurrentItem(newWindow, index = activeItemIndex) {
|
||||
const result = results[index];
|
||||
window.open(
|
||||
result.href,
|
||||
newWindow ? "_blank" : (result.target ?? searchProvider?.target ?? settings.target ?? "_blank"),
|
||||
@@ -180,7 +180,8 @@ export default function QuickLaunch({ servicesAndBookmarks, searchString, setSea
|
||||
|
||||
function handleItemClick(event) {
|
||||
closeAndReset();
|
||||
openCurrentItem(event.metaKey);
|
||||
// in case hover doesnt fire, use the clicked item, not the highlighted one
|
||||
openCurrentItem(event.metaKey, parseInt(event.currentTarget.dataset.index, 10));
|
||||
}
|
||||
|
||||
function handleItemKeyDown(event) {
|
||||
|
||||
Reference in New Issue
Block a user