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

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

Open
ppazos opened this issue Sep 10, 2024 · 1 comment

Comments

@ppazos
Copy link

ppazos commented Sep 10, 2024

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

@mistic100
Copy link
Owner

Try to set copyAttributes to an empty string (default it 'href target')

Also when posting code in Github, use back-quotes to escape it (I already edited your message)

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

No branches or pull requests

2 participants