Skip to content

Commit b4d4e89

Browse files
author
Wes Cossick
committed
Fix selection bug when toggling between side-by-side (sparksuite#309)
1 parent c949cad commit b4d4e89

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/js/simplemde.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,9 @@ function toggleSideBySide(editor) {
740740
} else {
741741
cm.off("update", cm.sideBySideRenderingFunction);
742742
}
743+
744+
// Refresh to fix selection being off (#309)
745+
cm.refresh();
743746
}
744747

745748

@@ -2015,4 +2018,4 @@ SimpleMDE.prototype.toTextArea = function() {
20152018
}
20162019
};
20172020

2018-
module.exports = SimpleMDE;
2021+
module.exports = SimpleMDE;

0 commit comments

Comments
 (0)