Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Commit 8f77aa3

Browse files
maximalism2facebook-github-bot
authored andcommitted
Implement click listener for editor wrapper (#2230)
Summary: **Summary** As I understand the `onClick` listener on the wrapper `div` element is suppose to replicate native `textarea/input` behavior. But the actual value of `onClick` property was `undefined` and thus needed to be implemented **Test Plan** It's an example file, no test plan is required. Pull Request resolved: #2230 Differential Revision: D18247675 Pulled By: mrkev fbshipit-source-id: 88e7160776f66daf1033351e4c5f2f4cfb5d40f1
1 parent 6217dc8 commit 8f77aa3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

examples/draft-0-10-0/plaintext/plaintext.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
this.onChange = (editorState) => this.setState({editorState});
3939
this.logState = () => console.log(this.state.editorState.toJS());
4040
this.setDomEditorRef = ref => this.domEditor = ref;
41+
this.focus = () => this.domEditor.focus();
4142
}
4243

4344
componentDidMount(){

0 commit comments

Comments
 (0)