This repository has been archived by the owner on Feb 6, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: 89f91105b97ae6b0eeb5b4d615642a79eef6ab92
- Loading branch information