File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 129129 function installDebouncedScroll ( threshold , element ) {
130130 var notify = debounce ( threshold , function ( e ) { element . trigger ( "scroll-debounced" , e ) ; } ) ;
131131 element . on ( "scroll" , function ( e ) {
132- if ( element . get ( ) . indexOf ( e . target ) >= 0 ) notify ( e ) ;
132+ if ( indexOf ( e . target , element . get ( ) ) >= 0 ) notify ( e ) ;
133133 } ) ;
134134 }
135135
451451 var choices = this . results . children ( ".select2-result" ) ;
452452
453453 if ( arguments . length === 0 ) {
454- return choices . get ( ) . indexOf ( choices . filter ( ".select2-highlighted" ) [ 0 ] ) ;
454+ return indexOf ( choices . filter ( ".select2-highlighted" ) [ 0 ] , choices . get ( ) ) ;
455455 }
456456
457457 choices . removeClass ( "select2-highlighted" ) ;
758758
759759 // hide the search box if this is the first we got the results and there are a few of them
760760
761- if ( initial === true ) {
762- this . search . toggle ( data . results . length >= this . opts . minimumResultsForSearch ) ;
761+ if ( initial === true ) {
762+ this . search . toggle ( data . results . length >= this . opts . minimumResultsForSearch ) ;
763763 }
764764
765765 } ;
11381138 select2 . init ( opts ) ;
11391139 } else if ( typeof ( args [ 0 ] ) === "string" ) {
11401140
1141- if ( allowedMethods . indexOf ( args [ 0 ] ) < 0 ) {
1141+ if ( indexOf ( args [ 0 ] , allowedMethods ) < 0 ) {
11421142 throw "Unknown method: " + args [ 0 ] ;
11431143 }
11441144
You can’t perform that action at this time.
0 commit comments