Skip to content

Commit

Permalink
Fix editer will unmount issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubh1692 committed Jun 12, 2021
1 parent 2c346a6 commit af91db4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/client/containers/NoteEditor.tsx
Expand Up @@ -109,7 +109,9 @@ export const NoteEditor: React.FC = () => {
className="editor mousetrap"
value={activeNote.text}
options={codeMirrorOptions}
editorWillUnmount={removeUrlElementListener}
editorWillUnmount={() => {
removeUrlElementListener()
}}
editorDidMount={(editor) => {
setTimeout(() => {
editor.focus()
Expand Down

0 comments on commit af91db4

Please sign in to comment.