File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1115
1115
*
1116
1116
*/
1117
1117
module . directive ( 'uiGridEditDropdown' ,
1118
- [ 'uiGridConstants' , 'uiGridEditConstants' ,
1119
- function ( uiGridConstants , uiGridEditConstants ) {
1118
+ [ 'uiGridConstants' , 'uiGridEditConstants' , '$timeout' ,
1119
+ function ( uiGridConstants , uiGridEditConstants , $timeout ) {
1120
1120
return {
1121
1121
require : [ '?^uiGrid' , '?^uiGridRenderContainer' ] ,
1122
1122
scope : true ,
1131
1131
1132
1132
//set focus at start of edit
1133
1133
$scope . $on ( uiGridEditConstants . events . BEGIN_CELL_EDIT , function ( ) {
1134
- $elm [ 0 ] . focus ( ) ;
1134
+ $timeout ( function ( ) {
1135
+ $elm [ 0 ] . focus ( ) ;
1136
+ } ) ;
1137
+
1135
1138
$elm [ 0 ] . style . width = ( $elm [ 0 ] . parentElement . offsetWidth - 1 ) + 'px' ;
1136
1139
$elm . on ( 'blur' , function ( evt ) {
1137
1140
$scope . stopEdit ( evt ) ;
You can’t perform that action at this time.
0 commit comments