diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js index 1d672e75cbb..e3f15e3eead 100644 --- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js +++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js @@ -523,10 +523,7 @@ angular.module('zeppelinWebApp').controller('ParagraphCtrl', function($scope, $r $scope.aceChanged = function() { $scope.dirtyText = $scope.editor.getSession().getValue(); $scope.startSaveTimer(); - - $timeout(function() { - $scope.setParagraphMode($scope.editor.getSession(), $scope.dirtyText, $scope.editor.getCursorPosition()); - }); + $scope.setParagraphMode($scope.editor.getSession(), $scope.dirtyText, $scope.editor.getCursorPosition()); }; $scope.aceLoaded = function(_editor) { @@ -535,6 +532,7 @@ angular.module('zeppelinWebApp').controller('ParagraphCtrl', function($scope, $r _editor.$blockScrolling = Infinity; $scope.editor = _editor; + $scope.editor.on('input', $scope.aceChanged); if (_editor.container.id !== '{{paragraph.id}}_editor') { $scope.editor.renderer.setShowGutter($scope.paragraph.config.lineNumbers); $scope.editor.setShowFoldWidgets(false); diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.html b/zeppelin-web/src/app/notebook/paragraph/paragraph.html index 9b8f17d6c1b..60ba6a67380 100644 --- a/zeppelin-web/src/app/notebook/paragraph/paragraph.html +++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.html @@ -41,7 +41,6 @@ class="editor" ui-ace="{ onLoad : aceLoaded, - onChange: aceChanged, require : ['ace/ext/language_tools'] }" ng-model="paragraph.text"