I have a button that opens a popup - when I click on the button I want the popup to show and if I click on it again I want it to dismiss.
However, I also want the popup to dismiss if I click outside, but if I click outside on the original button, it will trigger both the
onDismiss
and the
onClick
that shows the popup in the first place… is there something obvious I’m missing here? I would have assumed that the click outside would have been consumed and not triggered the button?