Skip to content

Commit 79e7cf2

Browse files
committed
Merge pull request #4423 from zuohaocheng/master
Fix(edit) #4422 Disable end-edit on scroll in deepedit mode to prevent…
2 parents 91bca52 + 7df0f61 commit 79e7cf2

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/features/edit/js/gridEdit.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,9 @@
760760

761761
//stop editing when grid is scrolled
762762
var deregOnGridScroll = $scope.col.grid.api.core.on.scrollBegin($scope, function () {
763+
if ($scope.grid.disableScrolling) {
764+
return;
765+
}
763766
endEdit();
764767
$scope.grid.api.edit.raise.afterCellEdit($scope.row.entity, $scope.col.colDef, cellModel($scope), origCellValue);
765768
deregOnGridScroll();

src/js/core/factories/GridRenderContainer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ angular.module('ui.grid')
739739
};
740740

741741
GridRenderContainer.prototype.needsHScrollbarPlaceholder = function () {
742-
return this.grid.options.enableHorizontalScrollbar && !this.hasHScrollbar;
742+
return this.grid.options.enableHorizontalScrollbar && !this.hasHScrollbar && !this.grid.disableScrolling;
743743
};
744744

745745
GridRenderContainer.prototype.getViewportStyle = function () {

0 commit comments

Comments
 (0)