Bug 1196914 - Don't scroll to focused input unless the IME went away and came back. r=rbarker
This commit is contained in:
@@ -2391,12 +2391,20 @@ public class GeckoAppShell
|
||||
return HardwareUtils.isTablet();
|
||||
}
|
||||
|
||||
private static boolean sImeWasEnabledOnLastResize = false;
|
||||
public static void viewSizeChanged() {
|
||||
LayerView v = getLayerView();
|
||||
if (v != null && v.isIMEEnabled()) {
|
||||
if (v == null) {
|
||||
return;
|
||||
}
|
||||
boolean imeIsEnabled = v.isIMEEnabled();
|
||||
if (imeIsEnabled && !sImeWasEnabledOnLastResize) {
|
||||
// The IME just came up after not being up, so let's scroll
|
||||
// to the focused input.
|
||||
sendEventToGecko(GeckoEvent.createBroadcastEvent(
|
||||
"ScrollTo:FocusedInput", ""));
|
||||
}
|
||||
sImeWasEnabledOnLastResize = imeIsEnabled;
|
||||
}
|
||||
|
||||
@WrapForJNI(stubName = "GetCurrentNetworkInformationWrapper")
|
||||
|
||||
Reference in New Issue
Block a user