зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1181969 - Typing one letter hides the keyboard, r=mcomella
This commit is contained in:
Родитель
86564eb5cd
Коммит
417c9610fd
|
@ -96,7 +96,7 @@ public class FindInPageBar extends LinearLayout implements TextWatcher, View.OnC
|
||||||
}
|
}
|
||||||
|
|
||||||
public void hide() {
|
public void hide() {
|
||||||
if (!mInflated) {
|
if (!mInflated || getVisibility() == View.GONE) {
|
||||||
// There's nothing to hide yet.
|
// There's nothing to hide yet.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -104,8 +104,13 @@ public class FindInPageBar extends LinearLayout implements TextWatcher, View.OnC
|
||||||
// Always clear the Find string, primarily for privacy.
|
// Always clear the Find string, primarily for privacy.
|
||||||
mFindText.setText("");
|
mFindText.setText("");
|
||||||
|
|
||||||
setVisibility(GONE);
|
// Only close the IMM if its EditText is the one with focus.
|
||||||
|
if (mFindText.isFocused()) {
|
||||||
getInputMethodManager(mFindText).hideSoftInputFromWindow(mFindText.getWindowToken(), 0);
|
getInputMethodManager(mFindText).hideSoftInputFromWindow(mFindText.getWindowToken(), 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Close the FIPB / FindHelper state.
|
||||||
|
setVisibility(GONE);
|
||||||
GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("FindInPage:Closed", null));
|
GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("FindInPage:Closed", null));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче