File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 40
40
autocomplete . setVal ( ) // clear value on page reload
41
41
input . on ( 'autocomplete:closed' , clearSearch . bind ( autocomplete ) )
42
42
input . on ( 'autocomplete:selected' , disableClose )
43
- input . on ( 'autocomplete:updated' , resetScroll . bind ( autocomplete . getWrapper ( ) . firstChild ) )
43
+ input . on ( 'autocomplete:updated' , resetScroll . bind ( typeahead ) )
44
44
dropdown . _ensureVisible = ensureVisible
45
45
menu . off ( 'mousedown.aa' )
46
46
var suggestionSelector = '.' + dropdown . cssClasses . prefix + dropdown . cssClasses . suggestion
51
51
monitorCtrlKey ( input , dropdown )
52
52
searchField . addEventListener ( 'click' , confineEvent )
53
53
document . documentElement . addEventListener ( 'click' , clearSearch . bind ( autocomplete ) )
54
- document . addEventListener ( 'keydown' , handleShortcuts . bind ( input ) )
54
+ document . addEventListener ( 'keydown' , handleShortcuts . bind ( typeahead ) )
55
55
if ( input . attr ( 'autofocus' ) != null ) input . focus ( )
56
56
}
57
57
60
60
}
61
61
62
62
function resetScroll ( ) {
63
- this . scrollTop = 0
63
+ this . dropdown . datasets [ 0 ] . $el . scrollTop ( 0 )
64
64
}
65
65
66
66
function toggleFilter ( ) {
99
99
var target = e . target || { }
100
100
if ( e . altKey || e . shiftKey || target . isContentEditable || 'disabled' in target ) return
101
101
if ( e . ctrlKey ? e . keyCode === SOLIDUS_KEY : e . keyCode === S_KEY ) {
102
- this . focus ( )
102
+ this . $input . focus ( )
103
103
e . preventDefault ( )
104
104
e . stopPropagation ( )
105
105
}
You can’t perform that action at this time.
0 commit comments