Tab changes focus when typing in Textbox
See original GitHub issueCurrent 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:
- Created a year ago
- Comments:5 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @edleeks87 for the workaround!
@vincentfodor thanks for raising this we’ll look to get a fix released asap, if you need a workaround you can use the
onTabChange
andselectedTabId
props to control the selectedTab
.https://codesandbox.io/s/zealous-roman-me7skc