Clicking outside of masters - is that even possible?

Hi all!
I’ve created a master component that includes a hamburger button and a menu. The hamburger has a hide/show interaction to toggle the menu’s visibility.
I searched for a way to hide the menu when clicking outside of it in the page (but to not hide the hamburger button), but little to no results came up.

Would love any suggestions to create such behaviour. :vulcan_salute:t2:
Thanks in advance!

What I usually do for a “click to dismiss” with a modal (like a popup menu) is to use a hotspot sized the same as the screen area. Showing the menu also shows the hotspot (thus masking the rest of the screen), and clicking the hotspot hides the menu–and the hotspot. This should work the same if it is in a Master or not.

Just to test and demonstrate this with a Master, here is a demo file with a Master named MyMenu. In this Master is a hamburger button and a group named “Menu”. Clicking Hamburger Button toggles visibility of Menu. The Menu group is a set of widgets for the Menu itself, in front of a Hotspot. The hotspot’s Loaded event sets itself to the size of the browser window, and its Click or Tap event calls
Fire Event Hamburger Button fire Click or Tap
(So it does same as clicking the Hamburger Button widget.)

Menu w click-dismiss.rp (96.6 KB)