Modify ↓
Ticket #12198 (closed bug: invalid)
AutoComplete " Cannot read property 'label' of null"
| Reported by: | nauman.qazi@… | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | None |
| Component: | unfiled | Version: | 1.8b1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Hello, I am using jQuery UI 1.8.18 so i can use autocomplete function. It works fine but at times, it throws excpetion from following method ,(line 6668)
$.extend( $.ui.autocomplete, {
escapeRegex: function( value ) {
return value.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
},
filter: function(array, term) {
var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" );
return $.grep( array, function(value) {
return matcher.test( /*value.label || value.value || */ value );//exception is here if i uncomment
});
}
});
Exception is " Cannot read property 'label' of null". As you can see that I have commented out the value.label and value.value for timebeing, it seems to be working fine.
Yet I am unclear of two things 1 - Why is this error happen some textboxes and not on others? 2 - Is it already fixed in new UI versions?
Thanks
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Please file bugs with jquery-ui against the jquery-ui bug tracker: http://bugs.jqueryui.com/