]> BookStack Code Mirror - bookstack/blobdiff - resources/js/markdown/codemirror.js
Fixed md editor refactoring issues after manual test
[bookstack] / resources / js / markdown / codemirror.js
index 27491902a1679fd912828cd73ffcaff7e78d4922..06860b929cddb3c5a73bb888af4dc2e91689aed7 100644 (file)
@@ -23,7 +23,7 @@ export async function init(editor) {
     cm.on('change', (instance, changeObj) => editor.actions.updateAndRender());
 
     // Handle scroll to sync display view
-    const onScrollDebounced = debounce(editor.actions.syncDisplayPosition, 100, false);
+    const onScrollDebounced = debounce(editor.actions.syncDisplayPosition.bind(editor.actions), 100, false);
     cm.on('scroll', instance => onScrollDebounced(instance));
 
     // Handle image paste