From 64e13d27802843b4e0944efe1dbea963a4c40b19 Mon Sep 17 00:00:00 2001 From: tatyabicchu Date: Sat, 16 Mar 2024 16:36:04 +0530 Subject: [PATCH] fixes i can right click on a context menu #20139 --- pkg/lib/cockpit-components-context-menu.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/lib/cockpit-components-context-menu.jsx b/pkg/lib/cockpit-components-context-menu.jsx index 55c55de4120b..3acd066fa929 100644 --- a/pkg/lib/cockpit-components-context-menu.jsx +++ b/pkg/lib/cockpit-components-context-menu.jsx @@ -46,7 +46,7 @@ export const ContextMenu = ({ parentId, children }) => { const _handleClick = (event) => { if (event && event.button === 0) { - const wasOutside = !(event.target.contains === root.current); + const wasOutside = !root.current.contains(event.target); if (wasOutside) setVisible(false);