diff --git a/mobile/android/base/gfx/GeckoSoftwareLayerClient.java b/mobile/android/base/gfx/GeckoSoftwareLayerClient.java index 97ce42fee27..00346f73bd7 100644 --- a/mobile/android/base/gfx/GeckoSoftwareLayerClient.java +++ b/mobile/android/base/gfx/GeckoSoftwareLayerClient.java @@ -162,7 +162,7 @@ public class GeckoSoftwareLayerClient extends LayerClient implements GeckoEventL GeckoAppShell.registerGeckoEventListener("Viewport:UpdateAndDraw", this); GeckoAppShell.registerGeckoEventListener("Viewport:UpdateLater", this); GeckoAppShell.registerGeckoEventListener("Document:Shown", this); - GeckoAppShell.registerGeckoEventListener("Tab:Selected", this); + GeckoAppShell.registerGeckoEventListener("Tab:Selected:Done", this); sendResizeEventIfNecessary(); } @@ -519,7 +519,7 @@ public class GeckoSoftwareLayerClient extends LayerClient implements GeckoEventL } else if ("Viewport:UpdateLater".equals(event)) { mUpdateViewportOnEndDraw = true; } else if (("Document:Shown".equals(event) || - "Tab:Selected".equals(event)) && + "Tab:Selected:Done".equals(event)) && (mTileLayer instanceof MultiTileLayer)) { beginTransaction(mTileLayer); try { diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js index 72da2b555c7..b26bfb658a2 100644 --- a/mobile/android/chrome/content/browser.js +++ b/mobile/android/chrome/content/browser.js @@ -539,6 +539,14 @@ var BrowserApp = { let evt = document.createEvent("UIEvents"); evt.initUIEvent("TabSelect", true, false, window, null); aTab.browser.dispatchEvent(evt); + + let message = { + gecko: { + type: "Tab:Selected:Done", + tabID: aTab.id + } + }; + sendMessageToJava(message); }, quit: function quit() {