Bug 400854 XUL menulist reacts to command keys with modifiers r=Enn sr=roc

This commit is contained in:
Neil Rashbrook 2008-09-07 10:43:57 +01:00
Родитель 6ad1a1eb00
Коммит a13851633c
1 изменённых файлов: 15 добавлений и 16 удалений

Просмотреть файл

@ -600,25 +600,24 @@ nsXBLPrototypeHandler::KeyEventMatched(nsIDOMKeyEvent* aKeyEvent,
PRUint32 aCharCode,
PRBool aIgnoreShiftKey)
{
if (mDetail == -1)
return PR_TRUE; // No filters set up. It's generic.
if (mDetail != -1) {
// Get the keycode or charcode of the key event.
PRUint32 code;
// Get the keycode or charcode of the key event.
PRUint32 code;
if (mMisc) {
if (aCharCode)
code = aCharCode;
if (mMisc) {
if (aCharCode)
code = aCharCode;
else
aKeyEvent->GetCharCode(&code);
if (IS_IN_BMP(code))
code = ToLowerCase(PRUnichar(code));
}
else
aKeyEvent->GetCharCode(&code);
if (IS_IN_BMP(code))
code = ToLowerCase(PRUnichar(code));
}
else
aKeyEvent->GetKeyCode(&code);
aKeyEvent->GetKeyCode(&code);
if (code != PRUint32(mDetail))
return PR_FALSE;
if (code != PRUint32(mDetail))
return PR_FALSE;
}
return ModifiersMatchMask(aKeyEvent, aIgnoreShiftKey);
}