Skip to content

Commit

Permalink
fix(website): keyboard navigation links in docsearch (#967)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayuhito committed Apr 17, 2024
1 parent e2b028d commit faed9aa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion website/app/components/docs/DocsHeader.tsx
Expand Up @@ -56,7 +56,12 @@ export const DocsHeader = () => {
const navigator = useRef({
navigate({ itemUrl }: { itemUrl?: string }) {
if (itemUrl) {
navigate(itemUrl);
const url = new URL(itemUrl);
if (url.hostname === 'fontsource.org') {
navigate(url.pathname);
} else {
window.open(itemUrl, '_blank');
}
}
},
}).current;
Expand Down

0 comments on commit faed9aa

Please sign in to comment.