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-confirm doesn't work on links without a turbo-method #1264

Open
JaceBayless opened this issue May 24, 2024 · 1 comment · May be fixed by #1266, #874 or hotwired/turbo-site#194
Open

turbo-confirm doesn't work on links without a turbo-method #1264

JaceBayless opened this issue May 24, 2024 · 1 comment · May be fixed by #1266, #874 or hotwired/turbo-site#194

Comments

@JaceBayless
Copy link

Expected behavior

According to the documentation here you can use data-turbo-confirm on an a tag to prevent navigation without a confirmation.

<a href="/articles" data-turbo-confirm="Do you want to leave this page?">Back to articles</a>

Actual behavior

Trying to confirm on navigation doesn't work unless a turbo-method is specified. Here's a codepen replicating this.

@tpaulshippy
Copy link

Care to comment on my PR with your particular use case?

searls added a commit to searls/turbo-site that referenced this issue Jul 5, 2024
Until hotwired/turbo#874 or hotwired/turbo#1266 resolve hotwired/turbo#1264 and  hotwired/turbo#943, the doc site is wrong and I keep wasting time double-checking it, only for its wrongness to result in me wasting more time debugging Turbo's source code.
searls added a commit to searls/turbo-site that referenced this issue Jul 5, 2024
Until hotwired/turbo#874 or hotwired/turbo#1266 resolve hotwired/turbo#1264 and  hotwired/turbo#943, the doc site is wrong and I keep wasting time double-checking it, only for its wrongness to result in me wasting more time debugging Turbo's source code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment