Page 1 of 1

Unity Android: Tooltip under overlay dialog is getting activated when dialog is dismissed by touch.

Posted: 17 Aug 2020, 18:05
by Jamieh
In our UI, we have several tooltips. These are generally for the WebGL build for users who have mouse, but we've left them in the Android build and you seem to be able to activate them with a "press and hold" on the UI element, which is sometimes useful for our users.

I'm seeing one problem though. On our Unity Android build, if I have a dialog layered on top our main screen that has the "OK" button over the top of a tooltip element, when you touch the OK button to dismiss the dialog, everything works fine, but then about .5-1 second later the tooltip from the underlying element is triggered. The dialog close is being triggered via Button Command,

I have not tried to duplicate this in an external project yet. I've been able to mitigate it a bit by disabling the tooltip service when the dialog is up and then delaying 500ms after the close of the dialog to re-enable it, but I'd like to find a solution that is less of a hack. I'm assuming this isn't standard WPF behavior, but I haven't tried it to see.

Re: Unity Android: Tooltip under overlay dialog is getting activated when dialog is dismissed by touch.

Posted: 19 Aug 2020, 11:27
by Jamieh
Ok, having looked at this more, it has something to do with the fact that I'm dismissing the overlays with a Command, and the touch event isn't being "handled" and is therefore going through to the underlying UI element.

If I handle the Touch Down event separately from the Command I don't have the problem.

Is this just what I have to do? Or is there something in the Touch Event -> Promoted to Mouse Event -> handled by Command chain that isn't working right? Should a Touch Event that is eventually promoted to a mouse event and handled by a Command propagate as a touch event to other UI elements?

Re: Unity Android: Tooltip under overlay dialog is getting activated when dialog is dismissed by touch.

Posted: 20 Aug 2020, 13:02
by sfernandez
Hi, we just realized there is something wrong in our Unity integration in relation to touch input, because we are incorrectly sending MouseMove events sometimes. I think this could be related to the problem you exposed. We'll try to reproduce it to check if those extra MouseMove events were the cause. We'll keep you informed.

Re: Unity Android: Tooltip under overlay dialog is getting activated when dialog is dismissed by touch.

Posted: 20 Aug 2020, 19:13
by Jamieh
Thanks! I have a useable workaround for now, but I'd rather not have to actively prevent this.

Re: Unity Android: Tooltip under overlay dialog is getting activated when dialog is dismissed by touch.

Posted: 24 Aug 2020, 13:28
by sfernandez
Could you please try to disable mouse in the NoesisView component for android and test if you can reproduce the problem with the tooltips?

This can be done by toggling 'Enable Mouse' option in the component or even by code:
NoesisView view = GetComponent<NoesisView>();
view.EnableMouse = false;

Re: Unity Android: Tooltip under overlay dialog is getting activated when dialog is dismissed by touch.

Posted: 24 Aug 2020, 13:28
by sfernandez
Could you please try to disable mouse in the NoesisView component for android and test if you can reproduce the problem with the tooltips?

This can be done by toggling 'Enable Mouse' option in the component or even by code:
NoesisView view = GetComponent<NoesisView>();
view.EnableMouse = false;

Re: Unity Android: Tooltip under overlay dialog is getting activated when dialog is dismissed by touch.

Posted: 26 Aug 2020, 07:51
by Jamieh
With mouse off I am seeing different behavior (aka, holding a finger on an element doesn't trigger the tool tip) but this particular problem still seems to be there. If I have an overlay with an ok button and the ok button is right above an item on the main screen with a tooltip, touching the OK button both dismisses the overlay and then triggers the tooltip.

Re: Unity Android: Tooltip under overlay dialog is getting activated when dialog is dismissed by touch.

Posted: 26 Aug 2020, 11:07
by sfernandez
Could you please create a ticket with a small project where that is happening, I'm unable to reproduce the problem.

Re: Unity Android: Tooltip under overlay dialog is getting activated when dialog is dismissed by touch.

Posted: 28 Aug 2020, 15:40
by Jamieh
I will have to build one--I will get back to you when I have it. Thanks.