Skip to content

Commit

Permalink
유저사이트 렌더 프레임 탈출 버그 수정 (#1483)
Browse files Browse the repository at this point in the history
  • Loading branch information
devunt committed Nov 19, 2024
1 parent 84204cf commit 488f8d9
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions apps/usersite/src/routes/_/render/[id]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,20 @@
}
}
`);
</script>
<svelte:head>
<base target="_blank" />
</svelte:head>
const handleClick = (e: MouseEvent) => {
if (e.target instanceof HTMLAnchorElement) {
e.preventDefault();
window.open(e.target.href, '_blank');
}
};
</script>

<div style:--usersite-theme-color={$query.publicSite.themeColor} class={css({ display: 'contents' })}>
<div
style:--usersite-theme-color={$query.publicSite.themeColor}
class={css({ display: 'contents' })}
onclickcapture={handleClick}
>
<h1 class={css({ textStyle: '34b', marginBottom: '32px' })}>{$query.publicPageById.title}</h1>
<TiptapRenderer content={$query.publicPageById.content.content} />
</div>

0 comments on commit 488f8d9

Please sign in to comment.