Bug 1581773 - Fix disappearing bookmark edit panel when choosing folder under Wayland; r=stransky a=lizzard
Differential Revision:
https://phabricator.services.mozilla.com/D46440
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -1154,26 +1154,35 @@ void nsWindow::HideWaylandPopupAndAllChi
if (quit) break;
}
}
bool IsPopupWithoutToplevelParent(nsMenuPopupFrame* aMenuPopupFrame) {
// Check if the popup is autocomplete (like tags autocomplete
// in the bookmark edit popup).
nsAtom* popupId = aMenuPopupFrame->GetContent()->GetID();
- if (popupId && popupId->Equals(NS_LITERAL_STRING("PopupAutoComplete"))) {
+ if (popupId &&
+ popupId->Equals(NS_LITERAL_STRING("editBMPanel_tagsAutocomplete"))) {
+ return true;
+ }
+
+ nsIFrame* parentFrame = aMenuPopupFrame->GetParent();
+ if (!parentFrame) {
+ return false;
+ }
+
+ // Check if the popup is in the folder menu list
+ nsAtom* parentId = parentFrame->GetContent()->GetID();
+ if (parentId &&
+ parentId->Equals(NS_LITERAL_STRING("editBMPanel_folderMenuList"))) {
return true;
}
// Check if the popup is in popupnotificationcontent (like choosing capture
// device when starting webrtc session).
- nsIFrame* parentFrame = aMenuPopupFrame->GetParent();
- if (!parentFrame) {
- return false;
- }
parentFrame = parentFrame->GetParent();
if (parentFrame && parentFrame->GetContent()->NodeName().EqualsLiteral(
"popupnotificationcontent")) {
return true;
}
return false;
}