Bug Tracker

Ticket #2874: whenNoMatch.patch

File whenNoMatch.patch, 0.6 kB (added by ash, 8 months ago)

The patch

  • jquery.autocomplete.js

     
    284284                function (result){ 
    285285                    // if no value found, clear the input box 
    286286                    if( !result ) $input.val(""); 
     287                    // ash: if we have function for cases where there is no match - call it 
     288                    if (options.whenNoMatch && jQuery.isFunction(options.whenNoMatch)) options.whenNoMatch($input); 
    287289                } 
    288290            ); 
    289291        } 
     
    732734    field.focus(); 
    733735}; 
    734736 
    735 })(jQuery); 
    736  No newline at end of file 
     737})(jQuery);