Page 1 of 1
onClick events on iOS 13 not working
Posted: 26 July 2020, 06:15
by Idsky
How many games are broken on iOS 13?
Apple updated their webkit and onClick events (ie tapping game element divs) is very flakey and often doesn't fire.
I've seen reports that it was broken on 13.1, better for a while and broken again on 13.4 and up.
Quantum isn't really playable (before or after my update) on iOS13 but worked fine on iOS12.
I've seen suggestions to add extra onclick events on parent elements or other nonsense but so far even these hacks are not working for me.
Apple should just fix it, but anyone else deal with this? I don't want to muck about with touch events (and carefully still allowing scroll and zoom!).
Re: onClick events on iOS 13 not working
Posted: 26 July 2020, 06:37
by JumpMaybe
Is it possible it's related to the use of the unofficial zoom css property by BGA's interface?
viewtopic.php?f=12&t=15917&p=59750&hilit=Zoom#p59637
It's causing problems with dojo.position being inaccurate, tooltips showing up in the wrong place, etc.
I'm not on iOS so I can't check..
Re: onClick events on iOS 13 not working
Posted: 26 July 2020, 08:35
by Tisaac
JumpMaybe wrote: ↑26 July 2020, 06:37
Is it possible it's related to the use of the unofficial zoom css property by BGA's interface?
viewtopic.php?f=12&t=15917&p=59750&hilit=Zoom#p59637
It's causing problems with dojo.position being inaccurate, tooltips showing up in the wrong place, etc.
I'm not on iOS so I can't check..
If that's the case, you could use the following code to keep the "zoom effect" using viewport :
Code: Select all
constructor: function () {
// Fix mobile viewport (remove CSS zoom)
this.default_viewport = 'width=550, user-scalable=no';
},
onScreenWidthChange: function () {
dojo.style('page-content', 'zoom', 'normal');
}
Re: onClick events on iOS 13 not working
Posted: 26 July 2020, 11:33
by JumpMaybe
Not to hyack this thread but page-content isnt the only thing being zoomed. The title bar and player information blocks are also zoomed, affecting the things I mentioned.
But it's speculation on my part that this is related to the iOS onclick issue.
Re: onClick events on iOS 13 not working
Posted: 27 July 2020, 03:16
by Marcuda
I've had this problem recently. Can't remember when exactly, or if related to any iOS update, but I found that by turning my phone to landscape I can get the expected result.
Re: onClick events on iOS 13 not working
Posted: 27 July 2020, 14:06
by Idsky
JumpMaybe wrote: ↑26 July 2020, 06:37
Is it possible it's related to the use of the unofficial zoom css property by BGA's interface?
viewtopic.php?f=12&t=15917&p=59750&hilit=Zoom#p59637
It's causing problems with dojo.position being inaccurate, tooltips showing up in the wrong place, etc.
I'm not on iOS so I can't check..
Thanks for that! I hadn't noticed that zoom style popping in on phones. I autoscale my own content using transform:scale and I was fighting with the zoom! So I killed the zoom.
That didn't fix the clicking though! Double tapping (at just the right speed so as to not trigger zooming!) would trigger the onclick!
The dijitTooltips are a big part of the problem.
When I scroll down to Options and disable tooltips, onclick works properly!
I had a couple of hover and not(:hover) background styles but with tooltips off, the game works fine with these, and turning those off and leaving tooltips on, it is still broken.
I don't know if tooltips can be turned off just for touch users through a js call. I disabled them with this CSS which made things work:
Code: Select all
@media all and (hover: none) {
.dijitTooltip {display:none !important}
}
(edited - I was targeting touch but some devices have touch and hover, so it's better to target devices without hover)
You lose every handy tooltip, but they never worked properly on iOS (wish they could come up on long-press or something!)
Re: onClick events on iOS 13 not working
Posted: 28 July 2020, 09:22
by docthib
Idsky wrote:Thanks for that! I hadn't noticed that zoom style popping in on phones. I autoscale my own content using transform:scale and I was fighting with the zoom! So I killed the zoom.
Same. I know it's not fully the subject here but it's important.
I think the framework should be using the transform:scale instead of zoom. Using a non standard css property is risky and may lead to unexpected behavior.