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

Commit

Permalink
Implement click listener for editor wrapper (#2230)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
maximalism2 authored and facebook-github-bot committed Nov 18, 2019
1 parent 6217dc8 commit 8f77aa3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/draft-0-10-0/plaintext/plaintext.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
this.onChange = (editorState) => this.setState({editorState});
this.logState = () => console.log(this.state.editorState.toJS());
this.setDomEditorRef = ref => this.domEditor = ref;
this.focus = () => this.domEditor.focus();
}

componentDidMount(){
Expand Down

0 comments on commit 8f77aa3

Please sign in to comment.