We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 021c2e8 commit 11c6094Copy full SHA for 11c6094
solara/widgets/vue/navigator.vue
@@ -67,8 +67,14 @@ modules.export = {
67
watch: {
68
location(value) {
69
console.log("changed", this.location, value);
70
- pathnameNew = (new URL(value, window.location)).pathname
71
- pathnameOld = window.location.pathname
+ const newUrl = new URL(value, window.location);
+ if(newUrl.origin != window.location.origin) {
72
+ // external navigation
73
+ window.location = newUrl;
74
+ return
75
+ }
76
+ const pathnameNew = newUrl.pathname
77
+ const pathnameOld = window.location.pathname
78
// if we use the back navigation, this watch will trigger,
79
// but we don't want to push the history
80
// otherwise we cannot go forward
0 commit comments