Closed k0va1 closed 6 months ago
I guess this is expected behavior. All regular links are being prefetched. And if the link responses with turbo stream instead of Turbo visit then it will cause immediate response on hover.
Possible solutions are:
data-turbo-prefetch
attribute as you mentioned.polaris_button_to("+ Add condition", add_condition_size_charts_path(id: 5))
https://polarisviewcomponents.org/lookbook/inspect/url_helpers/button
I've bumped into a problem while using
polaris_button
. The button is automatically clicked because of the prefetch feature in Turbo 8. I'm not quite sure that this behavior is expected. For example this code<%= polaris_button(url: add_condition_size_charts_path(id: 5)) { "+ Add condition" } %>
transforms intoAnd all links are prefetched by default in Turbo 8. So to make it looks like a button you need to disable prefetch feature or wrap polaris_button with
<div data-turbo-prefetch="false">
tag.