Index: chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java |
diff --git a/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java b/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java |
index 74619f9173f90f557b52a85ea0beedfb59d5e64c..c957f49641a553dbab9451bdeb45e1527cd54cbf 100644 |
--- a/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java |
+++ b/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java |
@@ -76,6 +76,7 @@ public class ChromeShellToolbar extends LinearLayout { |
private ImageButton mAddButton; |
private int mProgress = 0; |
private boolean mLoading = true; |
+ private boolean mHasFocus = false; |
/** |
* @param context The Context the view is running in. |
@@ -181,6 +182,7 @@ public class ChromeShellToolbar extends LinearLayout { |
mUrlTextView.setOnFocusChangeListener(new OnFocusChangeListener() { |
@Override |
public void onFocusChange(View v, boolean hasFocus) { |
+ mHasFocus = hasFocus; |
setKeyboardVisibilityForUrl(hasFocus); |
mStopReloadButton.setVisibility(hasFocus ? GONE : VISIBLE); |
if (!hasFocus && mTab != null) { |
@@ -266,6 +268,8 @@ public class ChromeShellToolbar extends LinearLayout { |
public void showAddButton(boolean visibility) { |
mAddButton.setVisibility(visibility ? VISIBLE : GONE); |
mStopReloadButton.setVisibility(visibility ? GONE : VISIBLE); |
+ if (visibility) |
+ setKeyboardVisibilityForUrl(mHasFocus); |
Bernhard Bauer
2014/11/13 09:35:09
I don't understand this. If |mHasFocus| is false a
divya.bansal
2014/11/13 09:49:07
@Bernhard this case is when focus is not on url fi
Bernhard Bauer
2014/11/13 10:06:30
Could we achieve this by unfocusing the text field
divya.bansal
2014/11/13 10:34:00
But if we unfocus the text field on opening the ta
Bernhard Bauer
2014/11/13 10:45:35
Okay, I see.
Could we simply hide the keyboard wh
divya.bansal
2014/11/13 11:47:51
Done.
|
} |
/** |