Skip to content

Commit 4f8ae64

Browse files
committed
Update gridEdit.js
Only run elem.select() if it is available. Some custom renderers are not input of type text.
1 parent 29eb6e1 commit 4f8ae64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/features/edit/js/gridEdit.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@
935935
$timeout(function () {
936936
$elm[0].focus();
937937
//only select text if it is not being replaced below in the cellNav viewPortKeyPress
938-
if ($scope.col.colDef.enableCellEditOnFocus || !(uiGridCtrl && uiGridCtrl.grid.api.cellNav)) {
938+
if ($elm[0].select && $scope.col.colDef.enableCellEditOnFocus || !(uiGridCtrl && uiGridCtrl.grid.api.cellNav)) {
939939
$elm[0].select();
940940
}
941941
else {

0 commit comments

Comments
 (0)