File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
packages/gitbook/src/components Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,12 @@ export async function EmbeddableDocsPage(props: EmbeddableDocsPageProps) {
5252 </ EmbeddableFrameHeaderMain >
5353 < EmbeddableFrameButtons >
5454 < EmbeddableDocsPageControlButtons
55- href = { context . linker . toPathInSite ( page . path ) }
55+ href = { context . linker
56+ . toPathForPage ( {
57+ pages : context . revision . pages ,
58+ page,
59+ } )
60+ . replace ( / ~ g i t b o o k \/ e m b e d \/ p a g e \/ ? / , '' ) }
5661 />
5762 </ EmbeddableFrameButtons >
5863 </ EmbeddableFrameHeader >
Original file line number Diff line number Diff line change @@ -78,8 +78,8 @@ export function Link(props: LinkProps) {
7878
7979 const onClick = ( event : React . MouseEvent < HTMLAnchorElement > ) => {
8080 const isExternalWithOrigin = isExternalLink ( href , window . location . origin ) ;
81- // Only trigger navigation context for internal links without modifier keys (i.e. open in new tab).
82- if ( ! isExternal && ! event . ctrlKey && ! event . metaKey ) {
81+ // Only trigger navigation context for internal links in the same window without modifier keys (i.e. open in new tab).
82+ if ( ! isExternal && target !== '_blank' && ! event . ctrlKey && ! event . metaKey ) {
8383 onNavigationClick ( href ) ;
8484 }
8585
You can’t perform that action at this time.
0 commit comments