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

Unified Diff: lib/appSupport.js

Issue 6228524553732096: Issue 1713 - (Disable/Enable on ...) not showing on FF Mobile (Closed)
Patch Set: Created Dec. 28, 2014, 7:26 p.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: lib/appSupport.js
===================================================================
--- a/lib/appSupport.js
+++ b/lib/appSupport.js
@@ -702,7 +702,11 @@
this.window = window;
this.callback = callback;
this.onSelect = this.onSelect.bind(this);
- this.attach();
+ this.attach = this.attach.bind(this);
+ if (window.BrowserApp.deck)
+ this.attach();
+ else
+ window.addEventListener("UIReady", this.attach, false);
};
BrowserChangeListener.prototype = {
window: null,
@@ -730,8 +734,8 @@
attach: function()
{
+ this.window.removeEventListener("UIReady", this.attach, false);
this.onSelect();
-
this.window.BrowserApp.deck.addEventListener("TabSelect", this.onSelect, false);
},
detach: function()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld