Bug 1188741 - Text selection action bar not appearing, r=kats
authorMark Capella <markcapella@twcny.rr.com>
Fri, 31 Jul 2015 17:25:29 -0400
changeset 287379 51c1e5d6c4a1c3f85fbb520fedb629437863ec03
parent 287378 b7930a87cabd2edaa30aa736059f15dc969c4b48
child 287380 7efbff41b71f7a1456614493c59eb27d51a6ac19
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1188741
milestone42.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 1188741 - Text selection action bar not appearing, r=kats
mobile/android/base/DynamicToolbar.java
--- a/mobile/android/base/DynamicToolbar.java
+++ b/mobile/android/base/DynamicToolbar.java
@@ -101,16 +101,21 @@ public class DynamicToolbar {
 
     public void setVisible(boolean visible, VisibilityTransition transition) {
         ThreadUtils.assertOnUiThread();
 
         if (layerView == null) {
             return;
         }
 
+        // Don't hide the ActionBar/Toolbar, if it's pinned open by TextSelection.
+        if (visible == false && pinFlags.contains(PinReason.ACTION_MODE)) {
+            return;
+        }
+
         final boolean isImmediate = transition == VisibilityTransition.IMMEDIATE;
         if (visible) {
             layerView.getLayerMarginsAnimator().showMargins(isImmediate);
         } else {
             layerView.getLayerMarginsAnimator().hideMargins(isImmediate);
         }
     }