-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Custom actions are triggered on hover (not click!) in 3.2 #3701
Comments
This behavior change is due to change in Turbo 8 (turbo-rails >= 2.0), which introduced the prefetch feature. At the same time I don't recommend |
@mshibuya Thank you very much for having taken the time to look into this. I'm working with @MichaelHoste, who opened this issue, and we have just tried your fix (f54a102). I confirm that it works as expected. Thank you! We agree with you: the |
Thank you for reporting back! Just released 3.2.1 🚢 |
3.2.1 release fixes our issue, but we also added this block in our custom actions just to be sure it won't happen again. register_instance_option :turbo? do
false
end Thank you for this quick fix! |
Hi there, we found what we think is a very serious issue in the 3.2 release.
Describe the bug
It seems that with this new release, when a link is hovered, the linked page is preloaded in the background. Maybe it's a new default behavior of turbo-rails?
The issue is that it also preloads custom actions⚠️
As you may have guessed, custom actions are usually destructive actions (remove user, charge payment, cancel payment, etc.) and these destructive actions are now triggered silently just by hovering the button.
Reproduction steps
Here is what happened to us (luckily in staging!), users were silently removed just by hovering a button:
Screen.Recording.2024-09-27.at.11.51.38.mov
Expected behavior
Is it really useful to preload every hovered link?
I guess we should at least disable this behavior from custom actions.
Additional context
rails
version: 7.0.8.4rails_admin
version: 3.2The text was updated successfully, but these errors were encountered: