File tree 2 files changed +14
-0
lines changed
2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 45
45
// add placeholder to get the comma-and-space at the end
46
46
terms . push ( "" ) ;
47
47
this . value = terms . join ( ", " ) ;
48
+ if ( document . selection ) {
49
+ this . focus ( ) ;
50
+ var range = document . selection . createRange ( ) ;
51
+ range . moveStart ( 'character' , this . value . length ) ;
52
+ range . moveEnd ( 'character' , 0 ) ;
53
+ range . select ( ) ;
54
+ }
48
55
return false ;
49
56
}
50
57
} ) ;
Original file line number Diff line number Diff line change 39
39
// add placeholder to get the comma-and-space at the end
40
40
terms . push ( "" ) ;
41
41
this . value = terms . join ( ", " ) ;
42
+ if ( document . selection ) {
43
+ this . focus ( ) ;
44
+ var range = document . selection . createRange ( ) ;
45
+ range . moveStart ( 'character' , this . value . length ) ;
46
+ range . moveEnd ( 'character' , 0 ) ;
47
+ range . select ( ) ;
48
+ }
42
49
return false ;
43
50
}
44
51
} ) ;
You can’t perform that action at this time.
0 commit comments