File tree Expand file tree Collapse file tree 2 files changed +4
-168
lines changed Expand file tree Collapse file tree 2 files changed +4
-168
lines changed Original file line number Diff line number Diff line change 42
42
// Fill new fake datalist
43
43
datalistItems . each ( function ( ) {
44
44
$ ( "<li />" , {
45
- "text" : $ ( this ) . val ( )
45
+ // .val is required here, not .text or .html
46
+ // HTML *needs* to be <option value="xxx"> not <option>xxx</option> (IE)
47
+ "text" : $ ( this ) . val ( )
46
48
} ) . appendTo ( $datalist ) ;
47
49
} ) ;
48
50
57
59
scrollValue = 0 ;
58
60
} )
59
61
. on ( "blur" , function ( ) {
60
-
61
62
// If this fires immediately, it prevents click-to-select from working
62
63
setTimeout ( function ( ) {
63
64
$datalist . fadeOut ( options . fadeOutSpeed ) ;
66
67
} )
67
68
. on ( "keyup focus" , function ( e ) {
68
69
searchPosition = $input . position ( ) ;
69
-
70
70
// Build datalist
71
71
$datalist
72
72
. show ( )
144
144
}
145
145
146
146
// return or tab key
147
- if ( e . keyCode == 13 || e . keyCode == 9 ) {
147
+ if ( e . keyCode == 13 || e . keyCode == 9 ) {
148
148
if ( active . length ) {
149
149
$input . val ( active . text ( ) ) ;
150
150
item_selected ( active . text ( ) ) ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments