question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tab changes focus when typing in Textbox

See original GitHub issue

Current behaviour

When typing in a Textbox inside of a Tab the first Tab of the Tabs-Component will be focused (See codesandbox: Select Tab 2 > Type in Textbox)

Expected behaviour

The current selected Tab should stay focused

CodeSandbox or Storybook URL

https://codesandbox.io/s/smoosh-bush-yvug80?file=/src/index.js

JIRA Ticket (Sage Only)

No response

Suggested Solution

No response

Carbon Version

111.0.3

Design Tokens Version

2.42.0

What browsers are you seeing the problem on?

Chrome

What Operating System are you seeing the problem on?

Windows

Anything else we should know?

No response

Confidentiality

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
vincentfodorcommented, Oct 5, 2022

Thanks @edleeks87 for the workaround!

1reaction
edleeks87commented, Oct 4, 2022

@vincentfodor thanks for raising this we’ll look to get a fix released asap, if you need a workaround you can use the onTabChange and selectedTabId props to control the selected Tab.

https://codesandbox.io/s/zealous-roman-me7skc

Read more comments on GitHub >

github_iconTop Results From Across the Web

Changing focus from on textbox to another, when tabpages is ...
I think you need to use SelectedIndexChanged event of TabControl instead of _Enter, using Enter event, focus will change to textBox2 every ...
Read more >
Texbox focus/loosefocus issues within a tab control - MSDN
I have lostfocus and focus on the textboxes and for tabbing ... That is not normal and really bad design to make one...
Read more >
Control focus with tabindex - web.dev
To focus an element, press the Tab key or call the element's focus() method. HTML; CSS. Result; Skip Results Iframe.
Read more >
Focusing: focus/blur - The Modern JavaScript Tutorial
The focus event is called on focusing, and blur – when the element loses the focus. Let's use them for validation of an...
Read more >
.focus() | jQuery API Documentation
Attempting to set focus to a hidden element causes an error in Internet Explorer. Take care to only use .focus() on elements that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found