followup fixes for bug 592330 - part 1 [r=me]
authorVivien Nicolas <21@vingtetun.org>
Thu, 30 Sep 2010 23:28:07 +0200
changeset 66762 b864890f3113e4aa2da76dd17557698dfdf9ab67
parent 66761 06e8fb27a3f8be5c977f4e4f9fd187a66ea723db
child 66763 5e0a240ae28e6fb4f27b54003f4bdab6ba918933
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs592330
followup fixes for bug 592330 - part 1 [r=me]
mobile/chrome/content/browser-ui.js
mobile/chrome/content/browser.js
mobile/chrome/content/browser.xul
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -593,17 +593,17 @@ var BrowserUI = {
     // Make sure we're online before attempting to load
     Util.forceOnline();
 
     let engine = Services.search.getEngineByName(aName);
     let submission = engine.getSubmission(searchValue, null);
     Browser.loadURI(submission.uri.spec, { postData: submission.postData });
   },
 
-  updateCurrentBrowser: function _updateCurrentBrowser() {
+  updateUIFocus: function _updateUIFocus() {
     let state = (Elements.contentShowing.getAttribute("disabled") == "true") ? "Blur" : "Focus";
     Browser.selectedBrowser.messageManager.sendAsyncMessage("Browser:" + state, {});
   },
 
   updateStar: function() {
     if (PlacesUtils.getMostRecentBookmarkForURI(Browser.selectedBrowser.currentURI) != -1)
       this.starButton.setAttribute("starred", "true");
     else
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -278,17 +278,17 @@ var Browser = {
 
       // XXX Hack. Browser also behaves badly on resize.
       getBrowser().style.display = "none";
       getBrowser().style.display = "block";
 
       // We want to keep the current focused element into view if possible
       let currentElement = document.activeElement;
       let [scrollbox, scrollInterface] = ScrollUtils.getScrollboxFromElement(currentElement);
-      if (currentElement && scrollbox && currentElement != scrollbox) {
+      if (currentElement && (currentElement.id != "inputhandler-overlay") && scrollbox && currentElement != scrollbox) {
         // retrieve the direct child of the scrollbox
         while (currentElement.parentNode != scrollbox)
           currentElement = currentElement.parentNode;
 
         setTimeout(function() { scrollInterface.ensureElementIsVisible(currentElement) }, 0);
       }
     }
     window.addEventListener("resize", resizeHandler, false);
--- a/mobile/chrome/content/browser.xul
+++ b/mobile/chrome/content/browser.xul
@@ -95,17 +95,17 @@
   </stringbundleset>
 
   <broadcasterset id="broadcasterset">
     <broadcaster id="bcast_contentShowing"/>
     <broadcaster id="bcast_urlbarState" mode="view"/>
   </broadcasterset>
 
   <observerset id="observerset">
-    <observes id="observe_contentShowing" element="bcast_contentShowing" attribute="disabled" onbroadcast="BrowserUI.updateCurrentBrowser();"/>
+    <observes id="observe_contentShowing" element="bcast_contentShowing" attribute="disabled" onbroadcast="BrowserUI.updateUIFocus();"/>
   </observerset>
 
   <commandset id="mainCommandSet">
     <!-- basic navigation -->
     <command id="cmd_back" label="&back.label;" disabled="true" oncommand="CommandUpdater.doCommand(this.id);"/>
     <command id="cmd_forward" label="&forward.label;" disabled="true" oncommand="CommandUpdater.doCommand(this.id);"/>
     <command id="cmd_reload" label="&reload.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
     <command id="cmd_forceReload" oncommand="CommandUpdater.doCommand(this.id);"/>