`usePress()` getting stuck on keyboard navigation to `_blank` target
- Dominant language
- TypeScript
- Stars
- 15.9k
- Forks
- 1.6k
- Avg merge
- 3d 9m
- Merged PRs (30d)
- 59
Description
### Provide a general summary of the issue here
When initiating navigation on an `` element with a `_blank` target and props spread on via `useLink()` or `usePress()`, the link will get stuck in pressed state if pressed via keyboard.
### 🤔 Expected Behavior?
`usePress()` should reset its pressed state, when navigating to new `_blank` target.
### 😯 Current Behavior
`isPressed` remains stuck in true, even when re-pressing the link.
### 💁 Possible Solution
I noticed this issue on the `` RAC but I am pretty sure the issue lies in `usePress()` failing to pickup the pointer up event when navigating to a `_blank` target. Maybe an event listener for a navigation event could be added to force a state reset.
### 🔦 Context
_No response_
### 🖥️ Steps to Reproduce
1. Visit the official docs [example](https://react-spectrum.adobe.com/react-aria/Link.html#example)
2. Initiate navigation through keyboard `ENTER`.
3. Observe the `Link` now being stuck in `data-pressed`
### Version
latest
### What browsers are you seeing the problem on?
Chrome
### If other, please specify.
_No response_
### What operating system are you using?
OSX
### 🧢 Your Company/Team
_No response_
### 🕷 Tracking Issue
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.