mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1253977 part 1 - Update focus state on combobox frame destruction/construction properly. r=tn
This commit is contained in:
parent
0524303c83
commit
dec5bab458
@ -958,6 +958,10 @@ nsComboboxControlFrame::SetDropDown(nsIFrame* aDropDownFrame)
|
||||
{
|
||||
mDropdownFrame = aDropDownFrame;
|
||||
mListControlFrame = do_QueryFrame(mDropdownFrame);
|
||||
if (!sFocused && nsContentUtils::IsFocusedContent(GetContent())) {
|
||||
sFocused = this;
|
||||
nsListControlFrame::ComboboxFocusSet();
|
||||
}
|
||||
}
|
||||
|
||||
nsIFrame*
|
||||
@ -1387,6 +1391,10 @@ nsComboboxControlFrame::CreateFrameFor(nsIContent* aContent)
|
||||
void
|
||||
nsComboboxControlFrame::DestroyFrom(nsIFrame* aDestructRoot)
|
||||
{
|
||||
if (sFocused == this) {
|
||||
sFocused = nullptr;
|
||||
}
|
||||
|
||||
// Revoke any pending RedisplayTextEvent
|
||||
mRedisplayTextEvent.Revoke();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user