Bug 747492 - Don't show vkb when plugin is focused on Android r=cpeterson

This commit is contained in:
James Willcox 2012-05-24 11:03:07 -04:00
parent b755e5a29b
commit 3f58ad3be0

View File

@ -2084,7 +2084,16 @@ nsWindow::SetInputContext(const InputContext& aContext,
return;
}
AndroidBridge::NotifyIMEEnabled(int(aContext.mIMEState.mEnabled),
int enabled = int(aContext.mIMEState.mEnabled);
// Only show the virtual keyboard for plugins if mOpen is set appropriately.
// This avoids showing it whenever a plugin is focused. Bug 747492
if (aContext.mIMEState.mEnabled == IMEState::PLUGIN &&
aContext.mIMEState.mOpen != IMEState::OPEN) {
enabled = int(IMEState::DISABLED);
}
AndroidBridge::NotifyIMEEnabled(enabled,
aContext.mHTMLInputType,
aContext.mActionHint);
}