Remove page url check in history.pushState
Current implementation of NavigationController does not allow using
`history.pushState()` if page url is not changed.
It worked by mistake in versions < 1.3.6 and got visible after fix 180a77e6
.
This commit is contained in:
parent
6d64336978
commit
3a9b035d36
1 changed files with 2 additions and 7 deletions
|
@ -27,7 +27,6 @@ var NavigationController = (function () {
|
||||||
this.history.push(this.webContents._getURL())
|
this.history.push(this.webContents._getURL())
|
||||||
}
|
}
|
||||||
this.webContents.on('navigation-entry-commited', (event, url, inPage, replaceEntry) => {
|
this.webContents.on('navigation-entry-commited', (event, url, inPage, replaceEntry) => {
|
||||||
var currentEntry
|
|
||||||
if (this.inPageIndex > -1 && !inPage) {
|
if (this.inPageIndex > -1 && !inPage) {
|
||||||
// Navigated to a new page, clear in-page mark.
|
// Navigated to a new page, clear in-page mark.
|
||||||
this.inPageIndex = -1
|
this.inPageIndex = -1
|
||||||
|
@ -46,13 +45,9 @@ var NavigationController = (function () {
|
||||||
} else {
|
} else {
|
||||||
// Normal navigation. Clear history.
|
// Normal navigation. Clear history.
|
||||||
this.history = this.history.slice(0, this.currentIndex + 1)
|
this.history = this.history.slice(0, this.currentIndex + 1)
|
||||||
currentEntry = this.history[this.currentIndex]
|
|
||||||
|
|
||||||
if (currentEntry !== url) {
|
|
||||||
this.currentIndex++
|
this.currentIndex++
|
||||||
this.history.push(url)
|
this.history.push(url)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue