Bug 760087 - Don't steal focus from the findbar when Gecko IME state changes [r=cpeterson]

--HG--
extra : rebase_source : 49a6582ff2c13b3a40963f430c7d9a5da5ac8141
This commit is contained in:
Matt Brubeck 2012-06-08 11:43:17 -07:00
parent ba543b377e
commit 72defcb15e
2 changed files with 4 additions and 10 deletions

View File

@ -1119,16 +1119,7 @@ public class GeckoInputConnection
return;
if (mIMEState != IME_STATE_DISABLED) {
if (!v.isFocused()) {
GeckoApp.mAppContext.mMainHandler.post(new Runnable() {
public void run() {
v.requestFocus();
imm.showSoftInput(v, 0);
}
});
} else {
imm.showSoftInput(v, 0);
}
imm.showSoftInput(v, 0);
} else {
imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
}

View File

@ -80,6 +80,9 @@ public class LayerView extends SurfaceView implements SurfaceHolder.Callback {
@Override
public boolean onTouchEvent(MotionEvent event) {
if (event.getActionMasked() == MotionEvent.ACTION_DOWN)
requestFocus();
/** We need to manually hide FormAssistPopup because it is not a regular PopupWindow. */
if (GeckoApp.mFormAssistPopup != null)
GeckoApp.mFormAssistPopup.hide();