Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions src/features/edit/js/gridEdit.js
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,14 @@
if (!inEdit) {
return;
}

//sometimes the events can't keep up with the keyboard and grid focus is lost, so always focus
//back to grid here. The focus call needs to be before the $destroy and removal of the control,
//otherwise ng-model-options of UpdateOn: 'blur' will not work.
if (uiGridCtrl && uiGridCtrl.grid.api.cellNav) {
uiGridCtrl.focus();
}

var gridCellContentsEl = angular.element($elm.children()[0]);
//remove edit element
editCellScope.$destroy();
Expand All @@ -790,11 +798,6 @@
inEdit = false;
registerBeginEditEvents();
$scope.grid.api.core.notifyDataChange( uiGridConstants.dataChange.EDIT );
//sometimes the events can't keep up with the keyboard and grid focus is lost, so always focus
//back to grid here
if (uiGridCtrl && uiGridCtrl.grid.api.cellNav) {
uiGridCtrl.focus();
}
}

function cancelEdit() {
Expand Down