Bug 583293 - Prevent the VKB from poping up in cases where focus is quickly changed r=dougt

This commit is contained in:
Steffen Imhof
2010-08-03 13:17:44 -07:00
parent c3b72fbd77
commit 2b06f33ec4
3 changed files with 55 additions and 4 deletions

View File

@@ -2504,7 +2504,14 @@ nsWindow::SetIMEEnabled(PRUint32 aState)
switch (aState) {
case nsIWidget::IME_STATUS_ENABLED:
case nsIWidget::IME_STATUS_PASSWORD:
mWidget->showVKB();
{
PRInt32 openDelay = 200;
nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
if (prefs)
prefs->GetIntPref("ui.vkb.open.delay", &openDelay);
mWidget->requestVKB(openDelay);
}
break;
default:
mWidget->hideVKB();