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

Can't listen to click if confirmation-event is configured #174

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

Can't listen to click if confirmation-event is configured #174

ppazos opened this issue Sep 13, 2024 · 1 comment

Comments

@ppazos
Copy link

ppazos commented Sep 13, 2024

Related to the issue I opened before, if I set the confirmation-event that is triggered when the Yes is clicked, but I need to trigger something on click, I can't, the click is ignored.

I have other plugin that shows a spinner on the button/link when it's clicked, and I can't trigger it because the click is not fired.

And because of #173 when click is configured, it's triggered right away without waiting for the "Yes" confirmation.

So my use case would be:

  1. allow listening on click, to do something that is not related with the navigation like displaying a spinner, one possibility is to be able to listen on the confirmation 'show' event and I think this is not possible right now.
  2. the event triggered when clicking "yes" in the confirm should do the navigation or whatever logic was associated with the button/link when it doesn't have the confirm configured.
@mistic100
Copy link
Owner

mistic100 commented Sep 13, 2024

On one issue you say the "click" event is triggered before you click "Yes", and here you say it does not... So I don't really understand what you want.

And I think you can listen to "show.confirmation" event https://github.com/mistic100/Bootstrap-Confirmation/blob/master/src/confirmation.js#L96-L110

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