Attempting to focus an Editor component on componentDidMount causes all plugins to fail
See original GitHub issueIf the parent component of the Editor
tries to focus
on the Editor
during componentDidMount
, no plugins will work.
The issue is reproduced in this repository: https://github.com/rohannair/test-draft-js/ where the master
branch is properly working but the cdm_focus_bug
branch is not. This is the diff of the change: https://github.com/rohannair/test-draft-js/pull/1
Thanks to @adrianmcli for helping me figure this out: 🍾
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Managing Focus | Draft.js
Managing text input focus can be a tricky task within React components. The browser.
Read more >React.js - input losing focus when rerendering - Stack Overflow
The loss of focus happens because the component prop uses React.createElement each time instead of just re-rendering the changes. Details here: https:// ...
Read more >react-quill - npm
ReactQuill will initialize the editor using defaultValue , but won't try to reset it after that. The onChange callback will still work as ......
Read more >Visual COBOL - Micro Focus
resellers or distributors will be held liable for any damages caused or ... If we have a number of COBOL components in an...
Read more >How To Convert React Class Components to Functional ...
With Hooks, you can create functional components that use state and lifecycle ... Let's consider a class with state and componentDidMount .
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
I’m doing this:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.