diff --git a/src/components/files/file-workspace-panel.tsx b/src/components/files/file-workspace-panel.tsx index 5972ad1..c702f21 100644 --- a/src/components/files/file-workspace-panel.tsx +++ b/src/components/files/file-workspace-panel.tsx @@ -1375,8 +1375,7 @@ export function FileWorkspacePanel() { ), // eslint-disable-next-line @typescript-eslint/no-unused-vars a: ({ node, href, children, ...aProps }) => { - const isRelative = - href && !/^https?:\/\/|^mailto:|^#/.test(href) + const isRelative = href && !/^[a-z][a-z0-9+.-]*:|^#/i.test(href) if (isRelative && href) { return ( openPath(`${folder.path}/${activeTab.path}`)} + onClick={() => { + openPath(`${folder.path}/${activeTab.path}`).catch(() => {}) + }} className="shrink-0 flex items-center justify-center w-10 hover:bg-primary/8 transition-colors" aria-label={t("preview")} title={t("preview")}