This repository was archived by the owner on Feb 6, 2023. It is now read-only.
Commit c1a55ce
Remove findDOMNode in DraftEditorDragHandler
Summary:
As in my previous change, editor.editorContainer is always an element and doesn't need findDOMNode.
https://github.com/facebook/draft-js/blob/822d2fbd3597c3fe20cc2508d6a12d9a6f856999/src/component/base/DraftEditor.react.js#L370
This isn't exactly the same because the previous code got the parent node:
https://github.com/facebook/draft-js/blob/822d2fbd3597c3fe20cc2508d6a12d9a6f856999/src/component/base/DraftEditor.react.js#L366
However for this purpose they're the same. There are no listeners on the inner one and the event bubbles. We already have a ref to the inner one so might as well use it.
Now I think that this has since been fixed in React so we might not need this workaround at all anymore.
Reviewed By: gaearon
Differential Revision: D19540873
fbshipit-source-id: 89f91105b97ae6b0eeb5b4d615642a79eef6ab921 parent 9d587d9 commit c1a55ce
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
142 | 141 | | |
143 | 142 | | |
144 | 143 | | |
145 | | - | |
| 144 | + | |
146 | 145 | | |
147 | 146 | | |
148 | 147 | | |
| |||
0 commit comments