Bug 935473 - Update forward button visibility when exiting editing mode (r=wesj, a=lsblakk)
authorLucas Rocha <lucasr@lucasr.org>
Thu, 05 Dec 2013 16:26:35 +0000
changeset 167855 ea3d6f1fcaaf051ed0db29a587d490195a44c074
parent 167854 499a6bcb6da9ed3f659c4489536dd1800d535556
child 167856 88596d701a2d4663282b63f13204af0fac6d99fc
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj, lsblakk
bugs935473
milestone27.0
Bug 935473 - Update forward button visibility when exiting editing mode (r=wesj, a=lsblakk)
mobile/android/base/BrowserToolbar.java
--- a/mobile/android/base/BrowserToolbar.java
+++ b/mobile/android/base/BrowserToolbar.java
@@ -1355,16 +1355,24 @@ public class BrowserToolbar extends Geck
             mActionItemBar.getChildAt(i).setEnabled(enabled);
         }
         ViewHelper.setAlpha(mActionItemBar, alpha);
 
         final Tab tab = Tabs.getInstance().getSelectedTab();
         if (tab != null) {
             setButtonEnabled(mBack, canDoBack(tab));
             setButtonEnabled(mForward, canDoForward(tab));
+
+            // Once the editing mode is finished, we have to ensure that the
+            // forward button slides away if necessary. This is because we might
+            // have only disabled it (without hiding it) when the toolbar entered
+            // editing mode.
+            if (!mIsEditing) {
+                animateForwardButton(canDoForward(tab));
+            }
         }
     }
 
     /**
      * Returns whether or not the URL bar is in editing mode (url bar is expanded, hiding the new
      * tab button). Note that selection state is independent of editing mode.
      */
     public boolean isEditing() {