diff --git a/www/code/inner.js b/www/code/inner.js
index 382b90fe4..2823d3582 100644
--- a/www/code/inner.js
+++ b/www/code/inner.js
@@ -437,35 +437,35 @@ define([
});
-/*
+
// add the splitter
- if (!$iframe.has('.cp-splitter').length) {
- var $preview = $iframe.find('#previewContainer');
+ if (!$('.cp-splitter').length) {
var splitter = $('
', {
'class': 'cp-splitter'
- }).appendTo($preview);
+ }).appendTo($previewContainer);
$preview.on('scroll', function() {
splitter.css('top', $preview.scrollTop() + 'px');
});
- var $target = $iframe.find('.CodeMirror');
+ var $target = $('.CodeMirror');
splitter.on('mousedown', function (e) {
e.preventDefault();
var x = e.pageX;
var w = $target.width();
- $iframe.on('mouseup mousemove', function handler(evt) {
+ $(window).on('mouseup mousemove', function handler(evt) {
if (evt.type === 'mouseup') {
- $iframe.off('mouseup mousemove', handler);
+ $(window).off('mouseup mousemove', handler);
return;
}
$target.css('width', (w - x + evt.pageX) + 'px');
+ editor.refresh();
});
});
}
-*/
+
Cryptpad.removeLoadingScreen();
setEditable(!readOnly);