diff --git a/core/bower.json b/core/bower.json
index c746813d4a..09f46a4969 100644
--- a/core/bower.json
+++ b/core/bower.json
@@ -22,6 +22,7 @@
"big.js": "~2.5.1",
"marked": "~0.3.3",
"acorn": "0.3.1",
- "katex-build": "~0.3.0"
+ "katex-build": "~0.3.0",
+ "scrollin": "~0.1.4"
}
}
diff --git a/core/src/main/web/app/mainapp/components/notebook/codecell-directive.js b/core/src/main/web/app/mainapp/components/notebook/codecell-directive.js
index 1711d371fb..8ff6a34b9a 100644
--- a/core/src/main/web/app/mainapp/components/notebook/codecell-directive.js
+++ b/core/src/main/web/app/mainapp/components/notebook/codecell-directive.js
@@ -56,7 +56,7 @@
$scope.isError = function() {
//jscs:disable
if ($scope.cellmodel === undefined || $scope.cellmodel.output === undefined || $scope.cellmodel.output.result === undefined) {
- //jscs:enable
+ //jscs:enable
return false;
}
@@ -342,11 +342,14 @@
}
});
- scope.cm = CodeMirror.fromTextArea(element.find('textarea')[0], codeMirrorOptions);
+ Scrollin.track(element[0], {handler: function() {
+ scope.cm = CodeMirror.fromTextArea(element.find('textarea')[0], codeMirrorOptions);
+ scope.bkNotebook.registerCM(scope.cellmodel.id, scope.cm);
+ scope.cm.on('change', changeHandler);
+ }});
scope.updateUI(scope.getEvaluator());
scope.bkNotebook.registerFocusable(scope.cellmodel.id, scope);
- scope.bkNotebook.registerCM(scope.cellmodel.id, scope.cm);
// cellmodel.body --> CodeMirror
scope.$watch('cellmodel.input.body', function(newVal, oldVal) {
@@ -370,8 +373,6 @@
}
};
- scope.cm.on('change', changeHandler);
-
var inputMenuDiv = element.find('.bkcell').first();
scope.popupMenu = function(event) {
var menu = inputMenuDiv.find('.dropdown').first();
@@ -417,6 +418,7 @@
});
scope.$on('$destroy', function() {
+ Scrollin.untrack(element[0]);
CodeMirror.off(window, 'resize', resizeHandler);
CodeMirror.off('change', changeHandler);
scope.bkNotebook.unregisterFocusable(scope.cellmodel.id);
diff --git a/core/src/main/web/app/template/index_template.html b/core/src/main/web/app/template/index_template.html
index 0a75d95f52..52398b8e6b 100644
--- a/core/src/main/web/app/template/index_template.html
+++ b/core/src/main/web/app/template/index_template.html
@@ -86,6 +86,7 @@
+
diff --git a/data/allDeps.zip b/data/allDeps.zip
index 4b0ba533b8..143ebc459c 100644
Binary files a/data/allDeps.zip and b/data/allDeps.zip differ