react-draft-wysiwyg
react-draft-wysiwyg copied to clipboard
Fix to focus editor when null
Steps to reproduce.
-
Create two components with react-draft-wysiwyg one in
readOnly
mode and the other inediting
mode. -
If the
readOnly
mode component is clicked theediting
component is rendered instead of thereadOnly
. -
Since the
readOnly
component was removed from DOM this error will appear on the console.
The problem is solved when the focusEditor
function is wrapped with an if
statement in order to verify that the Editor
still exists.
This fix also works for the test that was commented as pending and the #712 issue.
@jpuri We'll love to contribute to this library, let us know if something is missing or can be improved.
We are facing the same issue too. Can this PR be merged in and released?
We also have the same issue from #712 Hoping this can be merged and released.
We are got this issue too, it does not break anything but it's annoying especially when we use error tracking tool, this error is captured a lot. Hope this can be merged and release soon.
Hey @jpuri, hope you're doing well. I think this could be safely merged, and taking into account that other people is facing the same issue I think it will be a good contribution. Let us know if we need to change/add something.
Hi @jpuri @felixminom , do we have any roadmap when we can merge and release this?
Hey @martin-luo unfortunately I haven't gotten an answer, I see that this PR is all good to be merged. @jpuri if it's all good on your side, could you please merge it?