Closed
Description
Turbo 8 comes with InstantClick by default. This prefetches links while the cursor is hovering, which is a nice feature.
The WebDebugToolbar intercepts Ajax calls, which include the prefetched requests via InstantClick and dynamically adds an entry to the Ajax menu. The makes it really hard to click on an entry.
Turbo8-Profiler.mp4
I think it would nice be to disable the prefetching for the WebDebugToolbar via data-turbo-prefetch="false"
directly in the Profiler Bundle, but since it's Turbo specific I am not sure if that's the right place.
Another way would be to add an event listener to the turbo:before-prefetch
event that checks if the prefetch event comes from the WebDebugToolbar, e.g.
document.addEventListener("turbo:before-prefetch", (event) => {
if (event.target.closest('.sf-toolbar') !== null) {
event.preventDefault()
}
})