fix: navigating once an article is open
This commit is contained in:
@@ -177,7 +177,12 @@ export default {
|
||||
locale,
|
||||
prefersDarkMode: this.prefersDarkMode,
|
||||
});
|
||||
this.router.push({ name: 'article-viewer', query: { link } });
|
||||
// Add a timestamp so the route always changes, even when the same article
|
||||
// is requested again or the iframe was browsed to another page.
|
||||
this.router.push({
|
||||
name: 'article-viewer',
|
||||
query: { link, v: Date.now() },
|
||||
});
|
||||
},
|
||||
registerUnreadEvents() {
|
||||
emitter.on(ON_AGENT_MESSAGE_RECEIVED, () => {
|
||||
|
||||
@@ -11,6 +11,11 @@ export default {
|
||||
|
||||
<template>
|
||||
<div class="bg-white h-full">
|
||||
<IframeLoader :url="$route.query.link" />
|
||||
<!--
|
||||
Key by fullPath (not just the link) so the iframe remounts on every
|
||||
navigation here, including re-opening the same article via the SDK after
|
||||
the iframe was browsed to another help-center page. See App.vue#openArticle.
|
||||
-->
|
||||
<IframeLoader :key="$route.fullPath" :url="$route.query.link" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user