carbon icon indicating copy to clipboard operation
carbon copied to clipboard

No focus on FlatTable if we are in a sidebar with Search

Open maduv opened this issue 2 years ago • 2 comments
trafficstars

Current behaviour

When we are in a sidebar component, when i want to use tab keyboard to move into the component, i cannot reach the Flat Table if i have my search component above.

Expected behaviour

I want to reach the FlatTable after press tab key if the search had the focus

CodeSandbox or Storybook URL

https://codesandbox.io/s/happy-mccarthy-wf6txy

JIRA Ticket (Sage Only)

SBS-52110

Suggested Solution

No response

Carbon Version

119.8.0

Design Tokens Version

No response

What browsers are you seeing the problem on?

Chrome

What Operating System are you seeing the problem on?

MacOS

Anything else we should know?

No response

Confidentiality

  • [X] I confirm there is no confidential or commercially sensitive information included.

maduv avatar Aug 02 '23 09:08 maduv

FE-6078

tomdavies73 avatar Aug 08 '23 13:08 tomdavies73

This isn't related to FlatTable but due to the fact that the Search has a button that appears when the input has focus but disappears when it is blurred and there is no value, the browser will then try to focus this button next and when it can't find it place focus on the body. I've raised an issue about this pattern with the DS and I believe there will be a refactor of the component to only support either a search with button or without to avoid this.

https://codesandbox.io/s/elegant-scooby-q9hlh3 -- example of it working without button

edleeks87 avatar Aug 10 '23 14:08 edleeks87