Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/kylo/chrome/polo/content/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,15 @@ Browser.prototype.getZoomLevel = function() {
return this.getMarkupDocumentViewer().fullZoom;
}

/**
* Returns index of browser
* @name getBrowserIndex
* @returns {Number} The current index of browser
*/
Browser.prototype.getBrowserIndex = function () {
return this.browserIndex_;
}

/**
* Sets the zoom level for the current browser and updates
* the zoom widget as well
Expand Down
4 changes: 1 addition & 3 deletions src/kylo/chrome/polo/content/polo.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ BrowserMonitor.prototype.openURI = function(aURI, aOpener, aWhere, aContext) {
accessKey: "C",
popup: null,
callback: function(aNotificationBar, aButton) {
// TODO this alwayss closes the last tab... not good if new tabs
// have been opened since notification was shown
browser_.closeTab(browser_.browsers_.length - 1);
browser_.closeTab(browser.getBrowserIndex());
return true;
}
}
Expand Down