Foreground button click being intercepted by background button

Using Fuse Example OverLay-Menu as a basis, when the popover menu appears covering the main view, if I click on one of the overlayed buttons, the click is intercepted by a button on the Main screen which is in the background. I tried adding args.stopPropagation to the button function, but it never seems to get triggered. It’s always intercepted by the background button, rather than the foreground button. Is there a way to tell the background to stop responding to events while the overlay menu is active in the foreground?

Do any of these threads answer your question?

Thanks Remi! That looks like it might be what I was looking for. I’ll try it out. :smiley:

I worked through the solutions that Remi posted, and I got the buttons working now so that was good. But I’m finding now, that after I clicked the buttons on the popup panel, and the panel closes, that the front panel no longer accepts any clicks?

Any ideas why?

I haven’t looked at the source, but it sounds like it might be related to focus or perhaps HitTestMode.

The culprit is the rectangle called addTaskButtons and its somewhat unexpected behavior when its color is changing.

I believe this is what happens:

  • At first it has no color at all, which means it doesn’t get hit-tested
  • When you pop up the button panel the first time it gets assigned a color, which is faded to “#000d”.
  • When you exit the button panel that color is faded down to “#0000” (black with zero opacity being its default), but since it now has a color it is still hit-tested and effectively blocking all other interactions.

The simplest solution is to just put a HitTestMode="None" in that rectangle. However, given that you also have otherPanel for the same purpose (== hiding the calendar) you might be able to get rid of addTaskButtons altogether?

Yeh removing the addTaskButtons rectangle worked. Thanks.