The page is auto scrolled after update a task.

Hi everyone.
I’m using gantt combine with angularjs at here dhtmlx.com/blog/?p=2200
I added listener such as

gantt.attachEvent(“onAfterTaskUpdate”, function(id,item){
$scope.$apply(function(){
//nothing here but the page is scrolled to top after update task
});
});

but after I run that code, the page is auto scroll to top after I update a task or drag task.
The issue link I updated at dl.dropboxusercontent.com/u/152 … lumns.html
Please give me the solution, thank.

Change in the code of dhxGantt directive

$scope.$watch($attrs.data, function(collection){ gantt.clearAll(); gantt.parse(collection, "json"); }, true);

as

$scope.$watch($attrs.data, function(collection){ var state = gantt.getScrollState(); gantt.clearAll(); gantt.parse(collection, "json"); gantt.scrollTo(state.x, state.y); }, true);

Thank. it won’t fix.
However i fixed by change from
$scope.$watch($attrs.data, function(collection){
//stuff code
},true);

to

  $scope.$watch($attrs.data, function(collection){
//stuff code
  });

Thank for help, close now.