Skip to content

Commit

Permalink
Revert "Fixes electron#12147" (electron#12293)
Browse files Browse the repository at this point in the history
* Revert "Set appropriate defaults for webview options (electron#12271)"

This reverts commit c2673aa.

* Revert "Fixes electron#12147 (electron#12193)"

This reverts commit f54c94d.
  • Loading branch information
MarshallOfSound authored and sethlu committed May 3, 2018
1 parent d719ca9 commit de89a19
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/browser/api/navigation-controller.js
Expand Up @@ -21,6 +21,11 @@ var NavigationController = (function () {
this.webContents = webContents
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) => {
if (this.inPageIndex > -1 && !inPage) {
// Navigated to a new page, clear in-page mark.
Expand Down Expand Up @@ -101,12 +106,6 @@ var NavigationController = (function () {
this.currentIndex = -1
this.pendingIndex = -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 () {
Expand Down

0 comments on commit de89a19

Please sign in to comment.