adobe / react-spectrum

A collection of libraries and tools that help you build adaptive, accessible, and robust user experiences.
https://react-spectrum.adobe.com
Apache License 2.0
12.23k stars 1.07k forks source link

Can input receive focus differently in a popover scenario #5953

Open p1pah opened 4 months ago

p1pah commented 4 months ago

Provide a general summary of the issue here

It seems as though the default html behavior of inputs acts a little differently in an RAC Popover.

๐Ÿค” Expected Behavior?

The inputs contents should be selected when tabbing into a field.

๐Ÿ˜ฏ Current Behavior

When an input is in a popover, the default input selection is not the same.

๐Ÿ’ Possible Solution

Wondering if there is a prop or something I am missing that could allow for the input to select it's contents on focus.

๐Ÿ”ฆ Context

No response

๐Ÿ–ฅ๏ธ Steps to Reproduce

https://codesandbox.io/p/sandbox/jypop-xdp3hf?

Version

1.1.1

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

Windows 10

๐Ÿงข Your Company/Team

No response

๐Ÿ•ท Tracking Issue

No response

snowystinger commented 4 months ago

In a similar vein to your discussion (https://github.com/adobe/react-spectrum/discussions/5952), because it's in a containing focusscope, we're moving the focus, which is probably why it's not auto selecting. I think we could find a way to support that though.