Skip to content

Commit

Permalink
fix(edit): tweak the deep edit keydown logic so that Enter and Tab st…
Browse files Browse the repository at this point in the history
…ops editing
  • Loading branch information
swalters committed Jun 12, 2015
1 parent 9dfe9fd commit fbc38cb
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/features/edit/js/gridEdit.js
Original file line number Diff line number Diff line change
Expand Up @@ -881,15 +881,12 @@
break;
}

if ($scope.deepEdit) {
switch (evt.keyCode) {
case uiGridConstants.keymap.LEFT:
case uiGridConstants.keymap.RIGHT:
case uiGridConstants.keymap.UP:
case uiGridConstants.keymap.DOWN:
evt.stopPropagation();
break;
}
if ($scope.deepEdit &&
evt.keyCode === uiGridConstants.keymap.LEFT ||
evt.keyCode === uiGridConstants.keymap.RIGHT ||
evt.keyCode === uiGridConstants.keymap.UP ||
evt.keyCode === uiGridConstants.keymap.DOWN) {
evt.stopPropagation();
}
// Pass the keydown event off to the cellNav service, if it exists
else if (uiGridCtrl && uiGridCtrl.grid.api.cellNav) {
Expand Down

0 comments on commit fbc38cb

Please sign in to comment.