Skip to content

Commit

Permalink
fix iframe synchrization; fix #kubeflow/dashboard#65
Browse files Browse the repository at this point in the history
  • Loading branch information
hahahannes committed Jan 7, 2025
1 parent 78969ee commit 24d211f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ export class IframeContainer extends PolymerElement {
// Adds a click handler to be able to capture navigation events from
// the captured iframe and set the page property which notifies
const iframe = this.$.iframe;
iframe.addEventListener('load', () => {
iframe.addEventListener('load', (event) => {
const nextLocation = event.target.contentWindow.location;
const nextIframePage = nextLocation.href.slice(
nextLocation.origin.length);
this.page = nextIframePage;
const syncIframePage = () => {
const iframeLocation = iframe.contentWindow.location;
const newIframePage = iframeLocation.href.slice(
Expand Down
1 change: 0 additions & 1 deletion components/centraldashboard/public/components/main-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,6 @@ export class MainPage extends utilitiesMixin(PolymerElement) {
}
}
window.history.replaceState(null, null, l.toString());
this.set('routeHash.path', window.location.hash.substr(1));
}

/**
Expand Down

0 comments on commit 24d211f

Please sign in to comment.