Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: safari/ext/popup.js

Issue 5115653975441408: Let popup reload when it is shown, after it was programatically closed, on Safari (Closed)
Patch Set: Created Jan. 17, 2014, 11:38 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: safari/ext/popup.js
===================================================================
--- a/safari/ext/popup.js
+++ b/safari/ext/popup.js
@@ -7,13 +7,13 @@
// popover when the background page wasn't ready yet, since we have to access
// the background page in the popover.
var backgroundPage = safari.extension.globalPage.contentWindow;
- var readyState = backgroundPage.document.readyState;
+ var valid = backgroundPage.document.readyState == "complete";
var activeTab = safari.application.activeBrowserWindow.activeTab;
var stopResizing = function() {};
safari.self.addEventListener("popover", function()
{
- if (activeTab != safari.application.activeBrowserWindow.activeTab || readyState != "complete")
+ if (!valid || activeTab != safari.application.activeBrowserWindow.activeTab)
{
stopResizing();
document.documentElement.style.display = "none";
@@ -78,6 +78,7 @@
closePopup: function()
{
safari.self.hide();
+ valid = false;
}
};
window.TabMap = backgroundPage.TabMap;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld