Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stop_propagation config option to stop click or touch events propagation #904

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Zhephyr54
Copy link

Useful when using button-card inside another card.
Making it a config option instead of always applying it because of this comment.

For an example application, when using a button-card, inside the title-card of lovelace-expander-card with title-card-clickable. In this case, when clicking a button-card with a tap action, letting the click/touch event bubble up would also unintentionally expand/collapse the expander card.

@ngocjohn
Copy link

@Zhephyr54 Isn't it a bug in the expander-card? Any card with an action in the title card can trigger an expander... Probably the author of expander doesn't take into account the possibility that someone will use an action other than collapse/expand.

For example, I used the default tile-card for the title card. The result is the same, so this is more a problem of what handler function the expander uses

@Zhephyr54
Copy link
Author

@ngocjohn Not sure if this can be done in my specific use case: I am using a stack-in-card as a title card, this stack contains several button cards, some without action handlers that should propagate and others with action handlers that should stop propagation. How would you deal with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants