fix: navigating once an article is open

This commit is contained in:
Shivam Mishra
2026-06-10 14:33:35 +05:30
parent c9f6fb202c
commit f926f5e500
2 changed files with 12 additions and 2 deletions
+6 -1
View File
@@ -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>