How to Pass Click/Touch Event to a PopupPanel when starting from Outside Event Area?

183 views Asked by At

I describe the following problem for Mouse Events as well as for Touch Events. I want to do the following. Having a click/tab area which has the following function:

  • If I press the mouse down /touch start in this area a GWT PopupPanel should be displayed.
  • While the mouse is still pressed / touch is not released, the PopupPanel should be able to handle Events such as MouseOverEvent / TouchStartEvent.

I could manage to get the PopupPanel to occur. But, since the mouse is still pressed / touch not released there will no events be triggered on the PopupPanel. It does not matter if I use FocusPanel or mgwt TouchPanel inside the PopupPanel. Events will not be triggered if I enter the PopupPanel with the Mouse pressed or Touch pressed.

What the PopupPanel does:

The PopupPanel should serve as a context menu where one can tab, the popup menu occurs, one swipes over the popup menu (without releasing the mouse/finger) and release the mouse or the finger on the menu item one will choose.

Is there a way do enable events inside the PopupPanel when the event starts outside? Can I trigger the mousedown or touch start event when the PopupPanel occurs such that I can use events when I started the click/touch outside of the PopupPanel?

The following image shows this case:

enter image description here

Edit:

By the way I use the PopupPresenter from GWT-Platform. This adds a PopupPanel to the end of the page before

I tried the following. I put the PopupPanel of my page before the touch event starts right after page creation. The structure is like this.

<body>
  < div />
  < div />
  <gwt-PopupPanel />
</body>

Then I hided popup and showed it on touch start. Again there are no events triggered since the mouse was pressed / finger is still on the display when the popup becomes visible.

Edit: Here is a sample project for this case: https://github.com/confile/popup-test

0

There are 0 answers