- 
                Notifications
    
You must be signed in to change notification settings  - Fork 534
 
Open
Labels
prefetchingRelated to the prefetching featureRelated to the prefetching feature
Description
Version:
@inertiajs/vue3version: 2.0.0
Describe the problem:
When using prefetch="click", the visit is triggered on mouse up of the secondary mouse button (e.g. user is attempting to access context menu) - making it impossible to e.g. open in new tab without triggering a visit in the current window.
I cannot think of a scenario where the intent behind a secondary button press would be a visit in the same window (i.e. will always be new tab, new window, etc.), so we could probably just ignore any MouseEvent where MouseEvent.button === 2 (or possibly where MouseEvent.button !== 0).
I have only tested w/ Vue3, but it looks like this behavior is common to all adapters.
Steps to reproduce:
<Link href="/" prefetch="click">I shouldn't be visited when clicked with secondary</Link>
Metadata
Metadata
Assignees
Labels
prefetchingRelated to the prefetching featureRelated to the prefetching feature