mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 750734 - Ensure view is focused when showing virtual keyboard. r=cpeterson a=android-only
This commit is contained in:
parent
cf4934b327
commit
469178cb50
@ -1029,10 +1029,10 @@ public class GeckoInputConnection
|
||||
instance = null;
|
||||
}
|
||||
|
||||
View v = GeckoApp.mAppContext.getLayerController().getView();
|
||||
final View v = GeckoApp.mAppContext.getLayerController().getView();
|
||||
if (DEBUG) Log.d(LOGTAG, "IME: v=" + v);
|
||||
|
||||
InputMethodManager imm = getInputMethodManager();
|
||||
final InputMethodManager imm = getInputMethodManager();
|
||||
if (imm == null)
|
||||
return;
|
||||
|
||||
@ -1042,12 +1042,22 @@ public class GeckoInputConnection
|
||||
if (!mEnable)
|
||||
return;
|
||||
|
||||
if (mIMEState != IME_STATE_DISABLED)
|
||||
if (mIMEState != IME_STATE_DISABLED) {
|
||||
if (!v.isFocused()) {
|
||||
GeckoApp.mAppContext.mMainHandler.post(new Runnable() {
|
||||
public void run() {
|
||||
v.requestFocus();
|
||||
imm.showSoftInput(v, 0);
|
||||
else
|
||||
}
|
||||
});
|
||||
} else {
|
||||
imm.showSoftInput(v, 0);
|
||||
}
|
||||
} else {
|
||||
imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setEditable(String contents) {
|
||||
mEditable.removeSpan(this);
|
||||
|
Loading…
Reference in New Issue
Block a user