`usePress()` getting stuck on keyboard navigation to `_blank` target
Provide a general summary of the issue here
When initiating navigation on an <a/> 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 <Link /> 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
- Visit the official docs example
- Initiate navigation through keyboard
ENTER. - Observe the
Linknow being stuck indata-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
Can confirm, thanks for the issue!
Is anyone working on it?
@subashcs doesn't look like it, please go ahead
Hi @snowystinger,
I noticed that this issue is currently unassigned. Could you please let me know if @subashcs is working on it or if they have expressed interest in doing so? If not, I would be happy to take it on.
Thank you!
Go for it, that last comment was in April and there's no linked PR. Don't worry too much about the assignment.