The text area goes out of focus after a single character is typed
See original GitHub issueWhenever I type a single character, the text area goes out of focus or is deselected rather, and I have to click in the text area once again to type yet another character and the cycle continues.
This is my state of the class component where my editor resides in.
state = {
imageUrl: "",
title: "",
excerpt: "",
body: "",
submitMessage: "",
submitMessageTextColor: "",
};
This is my handler function:
onBodyChange = (value) => {
this.setState({
body: value,
});
};
This is my MDE component call:
<SimpleMDE onChange={this.onBodyChange} options={{hideIcons: ["preview", "side-by-side", "fullscreen"], }} />
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
In React ES6, why does the input field lose focus after typing a ...
Show activity on this post. In my component below, the input field loses focus after typing a character. While using Chrome's Inspector, it...
Read more >React Text Input Losing Focus After Each Keypress
Then click back into the text input. Then type 'o'. Click back into the text input. Then type the final 'o'.
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 >How to Use Text Areas (The Java™ Tutorials > Creating a GUI ...
Here is a picture of an example called TextDemo that enables you to type text using a text field (at the top) and...
Read more >TextArea focus out when typing - SAP Community
... of the TextAreas, after I type one character (maybe a couple if I am fast), the TextArea loses focus and the view...
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 Free
Top 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
As per
README.md
It’s not React, but JS. Read online what’s class field declaration in JS is.
Use react hooks API instead. React class components are deprecated much and nobody writes them anymore.