File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 785
785
if ( ! inEdit ) {
786
786
return ;
787
787
}
788
-
788
+
789
789
//sometimes the events can't keep up with the keyboard and grid focus is lost, so always focus
790
790
//back to grid here. The focus call needs to be before the $destroy and removal of the control,
791
791
//otherwise ng-model-options of UpdateOn: 'blur' will not work.
792
792
if ( uiGridCtrl && uiGridCtrl . grid . api . cellNav ) {
793
793
uiGridCtrl . focus ( ) ;
794
794
}
795
-
795
+
796
796
var gridCellContentsEl = angular . element ( $elm . children ( ) [ 0 ] ) ;
797
797
//remove edit element
798
798
editCellScope . $destroy ( ) ;
874
874
$scope . $on ( uiGridEditConstants . events . BEGIN_CELL_EDIT , function ( evt , triggerEvent ) {
875
875
$timeout ( function ( ) {
876
876
$elm [ 0 ] . focus ( ) ;
877
- $elm [ 0 ] . select ( ) ;
877
+ //only select text if it is not being replaced below in the cellNav viewPortKeyPress
878
+ if ( $scope . col . colDef . enableCellEditOnFocus || ! ( uiGridCtrl && uiGridCtrl . grid . api . cellNav ) ) {
879
+ $elm [ 0 ] . select ( ) ;
880
+ }
878
881
} ) ;
879
882
880
883
//set the keystroke that started the edit event
You can’t perform that action at this time.
0 commit comments