Jamieh
Topic Author
Posts: 44
Joined: 12 Apr 2019, 00:30

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

17 Aug 2020, 18:05

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.

Tags:
 
Jamieh
Topic Author
Posts: 44
Joined: 12 Apr 2019, 00:30

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

19 Aug 2020, 11:27

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?
 
User avatar
sfernandez
Site Admin
Posts: 1935
Joined: 22 Dec 2011, 19:20

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

20 Aug 2020, 13:02

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.
 
Jamieh
Topic Author
Posts: 44
Joined: 12 Apr 2019, 00:30

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

20 Aug 2020, 19:13

Thanks! I have a useable workaround for now, but I'd rather not have to actively prevent this.
 
User avatar
sfernandez
Site Admin
Posts: 1935
Joined: 22 Dec 2011, 19:20

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

24 Aug 2020, 13:28

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;
 
User avatar
sfernandez
Site Admin
Posts: 1935
Joined: 22 Dec 2011, 19:20

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

24 Aug 2020, 13:28

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;
 
Jamieh
Topic Author
Posts: 44
Joined: 12 Apr 2019, 00:30

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

26 Aug 2020, 07:51

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.
 
User avatar
sfernandez
Site Admin
Posts: 1935
Joined: 22 Dec 2011, 19:20

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

26 Aug 2020, 11:07

Could you please create a ticket with a small project where that is happening, I'm unable to reproduce the problem.
 
Jamieh
Topic Author
Posts: 44
Joined: 12 Apr 2019, 00:30

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

28 Aug 2020, 15:40

I will have to build one--I will get back to you when I have it. Thanks.

Who is online

Users browsing this forum: No registered users and 3 guests