Still a great card and I use it graciously, however the update to 2.x made the addon unusable for me. Every button I tap will inact a double tap. I know this is probably a bug in ios 13, but previously I could work around it by holding the button slightly longer than a tap but not too long to activate the hold_action. Unfortunately there is no way to do this anymore since this update and every button I press will turn itselfs back on/off immediately after pressing the button.
I will revert to 1.11 to see if it “fixes” my problem. I will also test this on my wifes phone later on as she is still on iOS 12. If Apple doesn’t fix this soon I am going crazy, and a gut feeling says they wont as it has been like this since beta 1 (we are on beta 4 now!)
Edit: it seems most prominent on buttons that switch conditional cards. Really strange
I guess if you use the default button from Home-Assistant Core, you have the same issue? (I use almost the same code as the one from Hass Core to handle tap and hold).
Would you mind doing the test please?
(the modification I did to handle tap and hold shouldn’t modify the behaviour… and also this shouldn’t be a problem as it works everywhere but not on IOS 13 )
I’m downloading xcode beta to be able to run the simulator with IOS 13 and test what’s going on… I guess I’ll have to do a dirty hack for this to work again… argh I hate Apple IOS devices
Srry not at home right now, but I have tested this with beta 1 and 2 and the behavior is the same with core buttons. So I don’t think there is really much you can do about it. I just noticed that with the 2.x update the behaviour is more prominent.
Pff I really hope that Apple will fix this, in the mean time I am going to try a fresh install of ios. Sometimes it helps doing this haha.
@jimz011, so I’ve checked… IOS 13 safari sends 4 javascript events when you tap a button:
touchstart
touchend delay like 100 or 200ms (WTF?)
mousedown (NEW, this creates a second click… that’s why it’s disabled again directly!)
click
While IOS 12 only sends 3 events when you tap a button:
touchstart
touchend
click
I’ll have a more in deep check of what is happening… I guess we’ll have to add some cooldown time to avoid running events multiple time…
Also it happens also for the Core Home Assistant button…
I hate you Apple !!
EDIT: Found an super ultra ugly way to handle Apple’s crazy behavior… @iantrich, that’s something you’ll love
Yes it also happens for the core button. I think I have created an issue for this on the Home Assistant github page (but honestly I can’t remember as I think I did this with the first beta).
Apple is changing a lot with iOS 13 (the Apple TV will no longer work with HA with TVOS 13). Really annoying, and they operate really weird, on one side they are opening up ios more and more for developers and at the same time they are locking already open features. Really annoying!
However it is still in beta, so it might change (but like I said it is beta 4 already and less than 2 months from release) usually these kind of things are fixed pretty quick.
It looks like it fixed it for me inside of Safari but I still have the same issue using the iOS companion app. Perhaps the user agent is different when loading from inside the iOS app?
[29/Jul/2019:12:50:32 -0500] "GET /community_plugin/button-card/button-card.js HTTP/2.0" 304 0 "https:///lovelace/main" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148" "-"
I havent updated this yet, because I am installing beta 5 right now. It might have fixed the problem all together but who knows. I will let you know after I have completed installing it. The reason I wait is because I want to see if anything has changed on Apple’s side.