Skip to content

Commit

Permalink
fix(edit): Change setViewValue to use a fromCharCode based on evt.which
Browse files Browse the repository at this point in the history
Fix bug that adds an unintelligible character to cell input on edit.
  • Loading branch information
micahh2 committed Oct 28, 2015
1 parent aa7ab65 commit f4054b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/features/edit/js/gridEdit.js
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@
if (uiGridCtrl && uiGridCtrl.grid.api.cellNav) {
var viewPortKeyDownUnregister = uiGridCtrl.grid.api.cellNav.on.viewPortKeyPress($scope, function (evt, rowCol) {
if (uiGridEditService.isStartEditKey(evt)) {
ngModel.$setViewValue(String.fromCharCode(evt.keyCode), evt);
ngModel.$setViewValue(String.fromCharCode( typeof evt.which === 'number' ? evt.which : evt.keyCode), evt);
ngModel.$render();
}
viewPortKeyDownUnregister();
Expand Down

0 comments on commit f4054b7

Please sign in to comment.