Fix open in new tab on firefox

This commit is contained in:
Georgi Gardev
2025-02-16 19:32:47 +02:00
parent 477b5b8b84
commit ccaf7bc3fa
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -42,7 +42,7 @@ export function SearchWidget({
const onKeyPress = (e: React.KeyboardEvent) => { const onKeyPress = (e: React.KeyboardEvent) => {
e.stopPropagation(); e.stopPropagation();
if (canOpenApp && e.shiftKey && e.key === 'Enter') { if (canOpenApp && e.metaKey && e.key === 'Enter') {
onOpenApp(); onOpenApp();
return; return;
} }
@@ -68,7 +68,7 @@ export function SearchWidget({
/> />
<div className={style.Provider}>{activeProvider?.name}</div> <div className={style.Provider}>{activeProvider?.name}</div>
</div> </div>
{canOpenApp && <span className={style.Hint}>Press Shift+Enter to open first result</span>} {canOpenApp && <span className={style.Hint}>Press Opt+Enter to open first result</span>}
</div> </div>
); );
} }
+1 -1
View File
@@ -95,7 +95,7 @@ export function IndexPage() {
setTerm={setSearchTerm} setTerm={setSearchTerm}
providers={searchProviders} providers={searchProviders}
canOpenApp={searchResults.length > 0} canOpenApp={searchResults.length > 0}
onOpenApp={() => window.open(searchResults[0].url)} onOpenApp={() => window.open(searchResults[0].url, '_blank', 'noreferrer')}
/> />
</div> </div>
{shouldSearchLocally ? ( {shouldSearchLocally ? (