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

Turbo.setConfirmMethod is not working #1242

Closed
RsMan-Dev opened this issue Apr 9, 2024 · 2 comments
Closed

Turbo.setConfirmMethod is not working #1242

RsMan-Dev opened this issue Apr 9, 2024 · 2 comments

Comments

@RsMan-Dev
Copy link

Hi, using turbo v.8.0.4, Turbo.setConfirmMethod is not working like in v.7, keeping using browser's native "confirm"

my link is like:

<a class="btn" data-turbo-confirm="Are you sure" data-turbo-method="get" href="#">Open Modal</a>

tried:
Turbo.setConfirmMethod(() => true)
Turbo.setConfirmMethod(myUsualMethodWorkingOnOlderProjects)

both are just acting like they was not called, showing the native "confirm"

@pokonski
Copy link

Where do you call Turbo.setConfirmMethod in your app?

@RsMan-Dev
Copy link
Author

@pokonski
I found the problem
In some projects the method worked, bot in other projects, there was a bug...
All was caused by turbo-rails that was not updated.
I was running turbo and turbo rails, so some issues happened

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants