Skip to content

Truly independent web browser

UI/Qt: Stop flashing a chosen menu item

Shannon Booth9e5c77ac3e55
diff --git a/UI/Qt/ChromeStyle.cpp b/UI/Qt/ChromeStyle.cpp
index 7514b3aa9f5..e2e4ef4bacb 100644
--- a/UI/Qt/ChromeStyle.cpp
+++ b/UI/Qt/ChromeStyle.cpp
@@ -1986,6 +1986,10 @@ public:
return true;
if (hint == SH_Menu_SubMenuUniDirectionFailCount)
return 1;
+ // NB: Qt flashes a chosen menu item by running a nested event loop, in which the tab that owns the menu can be
+ // closed and destroy the menu while Qt is still using it.
+ if (hint == SH_Menu_FlashTriggeredItem)
+ return false;
return QProxyStyle::styleHint(hint, option, widget, return_data);
}
};