Skip to content

Unexpected keyboard focus ring on SearchField, TextField components if they have height set #3850

Open
@briluu

Description

@briluu

🐛 Bug Report

If you set, say minHeight, on a SearchField, when SearchField is focused via keyboard it will include focusing the div in addition to the input element.

🤔 Expected Behavior

We expect to only see the focus ring on the input element itself.
Screen Shot 2022-12-14 at 1 37 04 PM

😯 Current Behavior

We are seeing two focus rings, one around input and one around the div.
Screen Shot 2022-12-14 at 1 37 52 PM

🔦 Context

We have some usages of the SearchField set with a minHeight in our product so when we keyboard tab into it, we noticed the double focus ring.

💻 Code Sample

https://codesandbox.io/s/loving-sea-vr2df2?file=/src/App.js

🌍 Your Environment

Software Version(s)
react-spectrum 3.23.0
Browser Reproduced in Chrome, Firefox
Operating System MacOS

🧢 Your Company/Team

Adobe Administration UIs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status

      📋 Waiting for Sprint

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions