Bug 1369488 - Force update popups anchored to hidden deck box, r?tnikkel@gmail.com draft
authorMartin Stransky <stransky@redhat.com>
Tue, 13 Jun 2017 10:03:27 +0200
changeset 593112 3f24f8fd68a69f05ff9bea767c0509b34a5a1bf0
parent 592979 2a3a253806d129c0bb6f2b76bf75630457a24492
child 633033 8178cd9f4af94351e3bf205cd3bc4820ad58fc82
push id63611
push userstransky@redhat.com
push dateTue, 13 Jun 2017 08:03:52 +0000
reviewerstnikkel
bugs1369488
milestone56.0a1
Bug 1369488 - Force update popups anchored to hidden deck box, r?tnikkel@gmail.com MozReview-Commit-ID: Ixj5zdtyUOc
layout/xul/nsDeckFrame.cpp
--- 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;