Bug 805153 - Check with the focus manager if our *content* is already focused. r=roc a=lsblakk

This commit is contained in:
Mats Palmgren 2012-11-05 23:43:44 +01:00
Родитель 23ba587057
Коммит cda4b759f5
1 изменённых файлов: 4 добавлений и 2 удалений

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

@ -6,8 +6,9 @@
#include "nsReadableUtils.h"
#include "nsComboboxControlFrame.h"
#include "nsIDOMEventTarget.h"
#include "nsFrameManager.h"
#include "nsFocusManager.h"
#include "nsFormControlFrame.h"
#include "nsFrameManager.h"
#include "nsGfxButtonControlFrame.h"
#include "nsGkAtoms.h"
#include "nsCSSAnonBoxes.h"
@ -981,7 +982,8 @@ nsComboboxControlFrame::ShowDropDown(bool aDoDropDown)
}
if (!mDroppedDown && aDoDropDown) {
if (sFocused == this) {
nsFocusManager* fm = nsFocusManager::GetFocusManager();
if (!fm || fm->GetFocusedContent() == GetContent()) {
DropDownPositionState state = AbsolutelyPositionDropDown();
if (state == eDropDownPositionFinal) {
ShowList(aDoDropDown); // might destroy us