Skip to content

pat-switch detecting click on container of link prevent default on anchor #378

Closed
@frontendplace

Description

@frontendplace

When I have an anchor inside an element to remove a class on click. the event on the anchor itself is prevented by default. There has to be a check that the click prevent default is only applied on the element with the switch class on it.

example fix use currentTarget instead of target

example: I have a collapsing menu. I want the menu to be closed when i click next to the menu. I use the pat-switch to remove the open class from the menu.
All the anchors inside that container do not react on click anymore because the

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions