Bug 935473 - Update forward button visibility when exiting editing mode (r=wesj)
authorLucas Rocha <lucasr@lucasr.org>
Thu, 05 Dec 2013 16:26:35 +0000
changeset 174650 dfe673e83ebc696a452799b8fcbb298bfe171bba
parent 174649 2c343bc88009383f5192c586f2bd153009bacec2
child 174651 a2e2a341e543f13c2cf0532ddcad12ee3e151c42
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj
bugs935473
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 935473 - Update forward button visibility when exiting editing mode (r=wesj)
mobile/android/base/toolbar/BrowserToolbar.java
--- a/mobile/android/base/toolbar/BrowserToolbar.java
+++ b/mobile/android/base/toolbar/BrowserToolbar.java
@@ -1113,16 +1113,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));
+            }
         }
     }
 
     public void setIsEditing(boolean isEditing) {
         mIsEditing = isEditing;
         mUrlEditLayout.setEnabled(isEditing);
     }