Mouse events outside InteractionDialog being consumed by underlying UI components

8 views
Skip to first unread message

P5music

unread,
Dec 15, 2020, 4:42:19 AM12/15/20
to CodenameOne Discussions
I am using InteractionDialog for the utility dialogs class of my app.
Some dialogs can be dismissed just with the user touching outside, others cannot, according to how the user eperience is designed.

In both cases
I see that touching outside cause the mouse event being consumed by the underlying form components, that is unwanted and bad behaviour.

How is it possibe to avoid this?

Thanks in advance

Shai Almog

unread,
Dec 15, 2020, 10:47:09 PM12/15/20
to CodenameOne Discussions
That's the core idea behind InteractionDialog as opposed to dialog. It was designed for floating not as a blocking dialog.

You can override pointer events in the form and block events that are outside of the bounds of the dialog.
Reply all
Reply to author
Forward
0 new messages