Page 1 of 1
tooltips and touchscreen
Posted: 27 July 2020, 17:00
by hersh
I'm looking at this
bug as I notice the same behaviour and would like to see tooltips work better for touch screen players.
I was looking at the .addTooltip(...) code and there is a line of code that seems to be triggering this behaviour.
Code: Select all
dojo.connect($(id), "onclick", this.tooltips[id], "close");
I'm guessing this line exists for users who hover/mouseenter over an element and then expect the tooltip to hide after clicking on the element. The challenge is touch screen users trigger the tooltip by clicking on it, which causes that line of code to execute (i.e. fire show/hide immediately). I'm not sure why sometimes it works, but it mostly does not.
any ideas on a different approach?
side bar: I've noticed that tooltips work relatively well in kingdom builder (the location tiles at least, not objectives). I'm not sure why that is the case. by working better I mean almost every time I click on it I see the tooltip.
Re: tooltips and touchscreen
Posted: 28 July 2020, 03:43
by hersh
I looked at dijit tooltip
code and I don't see an easy way to change the events it utilizes.
I think it would require removing that line or custom managing mouse/touch events and managing manually via dijit.Tooltip.show/hide. On the flip side without that line it could be annoying for touch users as the tooltip will remain even after clicking the game piece? Maybe need to try it in a game and see.
Also I looked closer at kingdom builder and some tooltips work well as one set has a custom onclick handler that stops propagation via stopPropagation().
Re: tooltips and touchscreen
Posted: 28 July 2020, 04:25
by Idsky
The tooltips completely break Quantum on iOS13. It seems that because something is set to appear on hover, the browser makes that one-tap and so you have to double-tap to select game pieces. And double tapping without triggering zoom/scroll requires just the right timing and accuracy -- not easy.
The tooltips don't even work (maybe due to that close trigger immediately firing but it seldom opens and is annoying to dismiss).
I've turned off tooltips on non-hover devices entirely to make the game playable. Wish tooltips could use long-press or something on touch / no-hover devices.
Code: Select all
@media all and (hover: none) {
.dijitTooltip {display:none !important}
}
Re: tooltips and touchscreen
Posted: 28 July 2020, 13:55
by hersh
I'm not familiar with Quantum, but why does tooltip break it for touch? does the tooltip get in the way?
internally it looks like tooltip uses dojo.position which I believe has some challenges with zoom
Re: tooltips and touchscreen
Posted: 29 July 2020, 15:14
by Idsky
hersh wrote: ↑28 July 2020, 13:55
I'm not familiar with Quantum, but why does tooltip break it for touch? does the tooltip get in the way?
internally it looks like tooltip uses dojo.position which I believe has some challenges with zoom
I haven't tested other games but I expect a lot will be broken on iOS13. iOS12 seemed okay with the tooltips but it seems the iOS13 webkit update is trying to do *something* with the hover tooltips on tap, which is breaking single-tap (onclick) selection. A double-click works instead but that is really annoying and zooms in if you get the timing slightly off. Disabling hover tooltips makes the onclick work properly.