File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1010 " css"
1111 ],
1212 "homepage" : " https://www.github.com/strapless/base" ,
13- "version" : " 1.1.7 " ,
13+ "version" : " 1.1.8 " ,
1414 "authors" : [
1515 {
1616 "name" : " Aaron M Jones" ,
Original file line number Diff line number Diff line change 44 *
55 * @returns {jQuery }
66 */
7- ( function ( $ ) {
7+ ; ( function ( $ ) {
88
99 $ . searchField = function ( el , options ) {
1010
3434
3535 plugin . settings = $ . extend ( { } , defaults , options ) ;
3636 plugin . currentValue = '' ;
37+ plugin . onChangeInterval = { } ;
3738
3839 // Remove autocomplete attribute to prevent native suggestions
3940 $input . attr ( 'autocomplete' , 'off' ) ;
4647 $input
4748 . on ( 'keyup' , function ( e ) { plugin . onKeyUp ( e ) ; } )
4849 . on ( 'keydown' , function ( e ) { plugin . onKeyDown ( e ) ; } )
49- . on ( 'blur' , function ( ) { plugin . doCallback ( ) ; } )
50- . on ( 'change' , function ( ) { plugin . doCallback ( ) ; } )
50+ . on ( 'blur' , function ( ) { if ( plugin . currentValue !== $input . val ( ) ) { plugin . doCallback ( ) ; } } )
51+ . on ( 'change' , function ( ) { if ( plugin . currentValue !== $input . val ( ) ) { plugin . doCallback ( ) ; } } )
5152 ;
5253 } ;
5354
99100 } ;
100101
101102 plugin . isSpecialKey = function ( keyPressed ) {
103+ var retval = false ;
102104 $ . each ( keys , function ( key , value ) {
103- return ( value === keyPressed ) ;
105+ retval = retval || ( value === keyPressed ) ;
104106 } ) ;
107+
108+ return retval ;
105109 } ;
106110
107111 plugin . doCallback = function ( ) {
You can’t perform that action at this time.
0 commit comments