Przeglądaj źródła

fixed always refreshing tinymce on key hit

Skylsmoi 5 lat temu
rodzic
commit
e364309a80
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/container/HtmlDocument.jsx

+ 1 - 1
src/container/HtmlDocument.jsx Wyświetl plik

@@ -71,7 +71,7 @@ class HtmlDocument extends React.Component {
71 71
 
72 72
     if (prevState.content.content_id !== state.content.content_id) this.loadContent()
73 73
 
74
-    if (state.mode === MODE.EDIT) {
74
+    if (state.mode === MODE.EDIT && prevState.mode !== state.mode) {
75 75
       tinymce.remove('#wysiwygNewVersion')
76 76
       wysiwyg('#wysiwygNewVersion', this.handleChangeText)
77 77
     }