onClick events on iOS 13 not working

Game development with Board Game Arena Studio
Post Reply
User avatar
Idsky
Posts: 132
Joined: 16 April 2020, 16:49

onClick events on iOS 13 not working

Post 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!).
User avatar
JumpMaybe
Posts: 41
Joined: 20 June 2019, 14:25

Re: onClick events on iOS 13 not working

Post 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..
User avatar
Tisaac
Posts: 2743
Joined: 26 August 2014, 21:28

Re: onClick events on iOS 13 not working

Post 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');
}
User avatar
JumpMaybe
Posts: 41
Joined: 20 June 2019, 14:25

Re: onClick events on iOS 13 not working

Post 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.
User avatar
Marcuda
Posts: 25
Joined: 21 September 2015, 00:36

Re: onClick events on iOS 13 not working

Post 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.
User avatar
Idsky
Posts: 132
Joined: 16 April 2020, 16:49

Re: onClick events on iOS 13 not working

Post 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!)
User avatar
docthib
Posts: 73
Joined: 10 August 2015, 14:05

Re: onClick events on iOS 13 not working

Post 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.
Post Reply

Return to “Developers”