Skip to content

Commit 33e6c0e

Browse files
committed
Merge pull request #4199 from MattOakley/bugFix
Fix (edit on focus + scroll): starting edit of focused cell after scroll #4192
2 parents 20ff45e + cac9c74 commit 33e6c0e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/features/edit/js/gridEdit.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,9 @@
530530

531531
cellNavNavigateDereg = uiGridCtrl.grid.api.cellNav.on.navigate($scope, function (newRowCol, oldRowCol) {
532532
if ($scope.col.colDef.enableCellEditOnFocus) {
533-
if (newRowCol.row === $scope.row && newRowCol.col === $scope.col) {
533+
// Don't begin edit if the cell hasn't changed
534+
if ((!oldRowCol || newRowCol.row !== oldRowCol.row || newRowCol.col !== oldRowCol.col) &&
535+
newRowCol.row === $scope.row && newRowCol.col === $scope.col) {
534536
$timeout(function () {
535537
beginEdit();
536538
});

0 commit comments

Comments
 (0)