Skip to content
Snippets Groups Projects
Commit f5ea6d7c authored by Yannis Barlas's avatar Yannis Barlas
Browse files

dispose substance drag manage to let react dnd to work

parent 22eae382
No related branches found
No related tags found
No related merge requests found
...@@ -275,6 +275,10 @@ class Editor extends ProseEditor { ...@@ -275,6 +275,10 @@ class Editor extends ProseEditor {
trackChangesProvider trackChangesProvider
} }
} }
dispose () {
this.editorSession.dragManager.dispose()
}
} }
export default Editor export default Editor
...@@ -152,7 +152,7 @@ export default class SimpleEditor extends React.Component { ...@@ -152,7 +152,7 @@ export default class SimpleEditor extends React.Component {
config: configurator.config config: configurator.config
}) })
Editor.mount({ this.editor = Editor.mount({
book, book,
configurator, configurator,
containerId, containerId,
...@@ -174,6 +174,8 @@ export default class SimpleEditor extends React.Component { ...@@ -174,6 +174,8 @@ export default class SimpleEditor extends React.Component {
componentWillUnmount () { componentWillUnmount () {
this._releaseLock() this._releaseLock()
window.removeEventListener('beforeunload', this._releaseLock) window.removeEventListener('beforeunload', this._releaseLock)
this.editor.dispose()
} }
// TODO -- use this for correctly refreshing props when the fragment arrives // TODO -- use this for correctly refreshing props when the fragment arrives
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment