Open
Description
Checklist
- I updated the card to the latest version available
- I cleared the cache of my browser
Describe the bug
Hi, if I have a swipe-card containing a button-card with sub-elements inside (as in many templates of Lovelace Minimalist UI), swipe doesn't work on iOS, both in Safari and the app.
Version of the card
Version: 4.1.2
To Reproduce
This is the configuration I used:
type: custom:swipe-card
cards:
- type: custom:button-card
name: Outer element
styles:
grid:
- grid-template-areas: '"item1" "n"'
custom_fields:
item1:
card:
type: custom:button-card
name: Nested element
Expected behavior
In the example, if the swipe starts from the outer element, it works correctly. However, if it starts from the nested element, it doesn't move, as if the nested element stops the propagation of touch events. On Windows, it works fine even when simulating a mobile device via Inspect Element.
Desktop:
- Browser chrome
Smartphone:
- Device: iPhone 13 Pro
- OS: iOS 18.0
- Browser safari
Additional context
The only solutions I've found are:
- Adding pointer-events: none to the nested element, but this prevents all click events as well.
card_mod:
style: |
#item1 {
pointer-events: none;
}
- Enabling the cssMode of Swiper, but with this, only the basic slide effect works.
Has anyone encountered the same issue? How can I solve it?