-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In the Playground Editor of a document, the Editor Tab and Options Tab automatically lose focus after switching between them. #1993
Comments
Weird!
Are you perhaps interested in investigating the problem? Perhaps this is a problem with them? Or we need to change something in the tabs here? |
I would be more than happy to look into it 🦾 |
@wooorm reactjs/react-tabs#451 |
Hello :) So I just released version v4.2.0 of react-tabs, which includes a fix for the focus. The problem here in this ticket is different though: The behavior for focus changed in v4 so that tabs are instantly focused on click to allow instant keyboard navigation. To disable this again I added a new prop This should make react-tabs not focus itself on click and leave the focus untouched. Can you check if this helps? |
Thanks Daniel! @PlayGuitar-CoderQ Could you try that? |
No problem, I'll check it out. |
@wooorm But I'm running mdx according to the contribution guide and there's an error reported that I haven't understood what's causing it. 🤔 |
Hmm I believe currently you need to be on Node 14 for this. |
You should be able to create a server inside the |
@danez Thanks Daniel! I have tested your fix with no problems. |
Thanks @PlayGuitar-CoderQ for the pull request, and @danez for the upstream fix! |
Initial checklist
Affected packages and versions
2.1.0
Link to runnable example
No response
Steps to reproduce
Click on the Playground page, first enter the content in the Editor tab, then click on the options tab and then come back to the Editor tab to enter the content, then the focus will be lost automatically.
👉 https://mdxjs.com/playground/
I am still in process in learning English. Sorry!😜
Expected behavior
The editor should type normally after switching tab selections
Actual behavior
The editor is behaving unusually out of focus after switching the Tab
Runtime
No response
Package manager
No response
OS
macOS
Build and bundle tools
No response
The text was updated successfully, but these errors were encountered: