Add stop_propagation config option to stop click or touch events propagation#904
Closed
Zhephyr54 wants to merge 1 commit intocustom-cards:masterfrom
Closed
Add stop_propagation config option to stop click or touch events propagation#904Zhephyr54 wants to merge 1 commit intocustom-cards:masterfrom
Zhephyr54 wants to merge 1 commit intocustom-cards:masterfrom
Conversation
…vents propagation
|
@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 |
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? |
Collaborator
|
I don't believe this is still relevant. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-cardof lovelace-expander-card withtitle-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.