From 8f77aa3432a56da202989dc5624daee70aef3e2f Mon Sep 17 00:00:00 2001 From: Max Vyz Date: Mon, 18 Nov 2019 10:42:09 -0800 Subject: [PATCH] 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: https://github.com/facebook/draft-js/pull/2230 Differential Revision: D18247675 Pulled By: mrkev fbshipit-source-id: 88e7160776f66daf1033351e4c5f2f4cfb5d40f1 --- examples/draft-0-10-0/plaintext/plaintext.html | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/draft-0-10-0/plaintext/plaintext.html b/examples/draft-0-10-0/plaintext/plaintext.html index 641a7855e2..4c8068b86a 100644 --- a/examples/draft-0-10-0/plaintext/plaintext.html +++ b/examples/draft-0-10-0/plaintext/plaintext.html @@ -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(){