Lovelace: Button card

Mouse works still with this change. It even does the “phantom double click” I am showing in the GIF above.

That’s something I can’t seem to reproduce:

Could it be because mine is a popup and not a state button? The weather bar at the top is not actually a button-card but the back button I press is. I will have to see if I can find an iOS12 device to test.

Another difference is I am using conditional cards and everything is actually on only one view.

On my side, it doesn’t happen if the spot where I click return is over the default core HA button on the target tab either.

I only started seeing this today after updating the button-card but I am not entirely sure what version I was on before. I will try and find out and test some more.

1 Like

Huge thanks for fixing the iOS 13 beta issue @RomRider. Lots of things were broken in my setup because of that, very happy that you were able to do a workaround for now. It’s working perfect for me now in iOS 13 b4 and the iOS beta 62 app.

There’s some other things broken in iOS 13 Safari and Home Assistant (unrelated to button card), for example can’t access the Lovelace “3 dots” menu where Refresh, Configure UI, and Unused entities is. I wonder if that’s also caused by the same issue you found?

Btw you can send bug reports using https://feedbackassistant.apple.com/ and those go directly to the relevant team inside Apple. It lets you upload files like screenshots and videos too, so that is probably the best way to report such things. I’ve been doing this with every iOS 13 beta so far, the more people who report these issues the greater chance it has of being fixed :slight_smile:

1 Like

Did beta 5 fix it for you? I installed beta 5 and I tried installing an older version this button-card but I cannot get it to double toggle anymore.

Doesn’t work with 2.0.2. Havent tried with 1.11 yet. Unfortunately I have no means of doing this right now.

So conclusion so far is that beta 5 did not fix the problem.

The culprit here is probably your cache :wink:

I mean I think your right but I have done everything to try and reset it. I cleared all data from safar, I tried versioning it in the resources.yaml and I have reset the mobile app. Any suggestions?

So after updating to the new version it doesn’t do this anymore. But the same problem as @shauder when going back (with conditional cards) it will immediately tap again and open the underlying button/card (in my case either picture elements with tap action or weather card like @shauder)

Do you know if the same thing happens on your wife’s iOS12 device? Another thing I notice is it doesn’t happen on the desktop with a mouse at all. It does happen on the phone when I used a mouse or touch.

No it doesn’t do it on my wifes iphone. I just tried it. It never does it, I have tried everything. So it seems like it really is ios 13 only

You shouldn’t have removed your post, it’s broken. It doesn’t work anymore with swipe-card or cch… I’ll need to revert some things.

1 Like

I’m sure that it’s will be perfect again :slight_smile:

So because of that bug, I almost ended up with my garage door closing on my car on the week end. I have a lock on the door switch but it did a double tap. I thought it was operator error. No harm done luckily. Thanks for the fix.

I did more testing now. I spun up a simulated iOS device with xcode and I was completely unable to reproduce this bug while at the same time having it still on my device. I am using the beta xcode and iOS13 and the same device type.

Then to test my memory of not having this issue I renamed the js file and edited my resource path to the new file which was the old 1.11.1. I do not have the new issue on either the simulated device nor my device but the original issue has returned.

I then renamed the resource path back to the new one and the original issue is fixed but now I have the new issue again. This doesn’t really help the fact that you cannot reproduce it though.

Trying to build the old version from github and I get an error:

src\button-card.ts
Error: C:/Users/shanefaulkner/Desktop/button-card2/src/button-card.ts(547,9): semantic error TS2542 Index signature in type 'StyleInfo' only permits reading.

Any ideas why the old versions won’t compile now in babel?

Ok, so I have reverted to 1.11.1 and the conditional card glitch is gone (it would double tap quickly after turning on/off a button that would at the same time change the card behind it as it is conditional). I use a lot of conditional cards as they are more versatile than popup cards imo as they are just on a single view and thus scrollable.

Now the button glitch is back in this version, but the bug with conditional cards seem to work.

In your newest release the buttons work great but the conditional cards don’t.

Here is a video with 1.11.1, as you will see the light buttons will do a double tap, but the conditional cards work perfectly fine.

Here is 2.0.4, the buttons work fine here but the conditional cards wont. When pressing a button which changes the card it will press it again, in my case either opening the weather panel or the person panel.

Awesome look! I might try this

I was able to take this line in version 1.11.1: https://github.com/custom-cards/button-card/blob/efcaf7a7797465728edbd747391adb40651bb66c/dist/button-card.js#L880

And remove ‘, t.addEventListener(“mousedown”, e, { passive: !0 }), t.addEventListener(“click”, n)’ from the end leaving the semi-colon. This fixes both issues with the inability to use it on the desktop.

I cannot get the old version to build so I cannot add the if statements easily for discarding them only when iOS.

I also confirmed that the issue starts with 2.0.0