From 3f58ad3be0350b9ce1eab666c687d80db7bc2c7f Mon Sep 17 00:00:00 2001 From: James Willcox Date: Thu, 24 May 2012 11:03:07 -0400 Subject: [PATCH] Bug 747492 - Don't show vkb when plugin is focused on Android r=cpeterson --- widget/android/nsWindow.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/widget/android/nsWindow.cpp b/widget/android/nsWindow.cpp index 60d4250ed317..8c50cdc3c8d4 100644 --- a/widget/android/nsWindow.cpp +++ b/widget/android/nsWindow.cpp @@ -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); }