Skip to content

if there is an "href" attribute, clicking "yes" triggers click and ignores custom events #172

@ppazos

Description

@ppazos

Applying the plugin to an element that contains an "href" attribute, triggers the click directly and goes to the URL in the href value. That ignores the data-confirmation-event that should be triggered instead of the click.

I tested <a href="..." data-toggle="confirmation" data-confirmation-event="other">click me</a>

But also if the <a> is changed for a <button> does the same thing if there is an href attribute (I know the button shouldn't have an href but the plugin takes it anyway), try:

<button href="..." data-toggle="confirmation" data-confirmation-event="other">click me</button>

I expect the data-confirmation-event to be triggered instead of the click as said in the docs https://bootstrap-confirmation.js.org/#ex-custom-event

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions