Revert "Fixes electron/electron#12147" (#12293)
* Revert "Set appropriate defaults for webview options (#12271)" This reverts commitc2673aa970
. * Revert "Fixes electron/electron#12147 (#12193)" This reverts commitf54c94d6c9
.
This commit is contained in:
parent
2681e769a6
commit
4b476f13bb
1 changed files with 5 additions and 6 deletions
|
@ -21,6 +21,11 @@ var NavigationController = (function () {
|
||||||
this.webContents = webContents
|
this.webContents = webContents
|
||||||
this.clearHistory()
|
this.clearHistory()
|
||||||
|
|
||||||
|
// webContents may have already navigated to a page.
|
||||||
|
if (this.webContents._getURL()) {
|
||||||
|
this.currentIndex++
|
||||||
|
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) => {
|
||||||
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.
|
||||||
|
@ -101,12 +106,6 @@ var NavigationController = (function () {
|
||||||
this.currentIndex = -1
|
this.currentIndex = -1
|
||||||
this.pendingIndex = -1
|
this.pendingIndex = -1
|
||||||
this.inPageIndex = -1
|
this.inPageIndex = -1
|
||||||
|
|
||||||
// webContents may have already navigated to a page.
|
|
||||||
if (this.webContents._getURL()) {
|
|
||||||
this.currentIndex++
|
|
||||||
this.history.push(this.webContents._getURL())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NavigationController.prototype.goBack = function () {
|
NavigationController.prototype.goBack = function () {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue