Skip to content

Commit e070a11

Browse files
committed
fix iframe synchronization; fix #65
1 parent 58579ee commit e070a11

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

components/centraldashboard/public/components/iframe-container.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ export class IframeContainer extends PolymerElement {
5454
// Adds a click handler to be able to capture navigation events from
5555
// the captured iframe and set the page property which notifies
5656
const iframe = this.$.iframe;
57-
iframe.addEventListener('load', () => {
57+
iframe.addEventListener('load', (event) => {
58+
const nextLocation = event.target.contentWindow.location;
59+
const nextIframePage = nextLocation.href.slice(
60+
nextLocation.origin.length);
61+
this.page = nextIframePage;
5862
const syncIframePage = () => {
5963
const iframeLocation = iframe.contentWindow.location;
6064
const newIframePage = iframeLocation.href.slice(

components/centraldashboard/public/components/main-page.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,6 @@ export class MainPage extends utilitiesMixin(PolymerElement) {
381381
}
382382
}
383383
window.history.replaceState(null, null, l.toString());
384-
this.set('routeHash.path', window.location.hash.substr(1));
385384
}
386385

387386
/**

0 commit comments

Comments
 (0)