Fix open in new tab on firefox
This commit is contained in:
@@ -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>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 ? (
|
||||||
|
|||||||
Reference in New Issue
Block a user