Bug 1369488 - Force update popups anchored to hidden deck box, r?tnikkel@gmail.com
MozReview-Commit-ID: Ixj5zdtyUOc
--- a/layout/xul/nsDeckFrame.cpp
+++ b/layout/xul/nsDeckFrame.cpp
@@ -105,16 +105,23 @@ nsDeckFrame::IndexChanged()
#ifdef ACCESSIBILITY
nsAccessibilityService* accService = GetAccService();
if (accService) {
accService->DeckPanelSwitched(PresContext()->GetPresShell(), mContent,
currentBox, GetSelectedBox());
}
#endif
+
+ // Force any popups that might be anchored on elements within hidden
+ // box to update.
+ nsXULPopupManager* pm = nsXULPopupManager::GetInstance();
+ if (pm && currentBox) {
+ pm->UpdatePopupPositions(currentBox->PresContext()->RefreshDriver());
+ }
}
int32_t
nsDeckFrame::GetSelectedIndex()
{
// default index is 0
int32_t index = 0;