Skip to content
Permalink
Browse files

Autocomplete: Removed data fallback for item.autocomplete. Fixes #815…

…6 - Autocomplete: Remove data fallbacks.
  • Loading branch information...
scottgonzalez committed Oct 25, 2012
1 parent 2582bfa commit 9202bb7df57b159003f6a0659cbe9359fdeb8196
Showing with 2 additions and 8 deletions.
  1. +0 −1 demos/autocomplete/combobox.html
  2. +0 −1 demos/autocomplete/custom-data.html
  3. +2 −6 ui/jquery.ui.autocomplete.js
@@ -111,7 +111,6 @@
input.data( "autocomplete" )._renderItem = function( ul, item ) {
return $( "<li>" )
.data( "item.autocomplete", item )
.append( "<a>" + item.label + "</a>" )
.appendTo( ul );
};
@@ -68,7 +68,6 @@
})
.data( "autocomplete" )._renderItem = function( ul, item ) {
return $( "<li>" )
.data( "item.autocomplete", item )
.append( "<a>" + item.label + "<br>" + item.desc + "</a>" )
.appendTo( ul );
};
@@ -237,9 +237,7 @@ $.widget( "ui.autocomplete", {
}
}

// back compat for _renderItem using item.autocomplete, via #7810
// TODO remove the fallback, see #8156
var item = ui.item.data( "ui-autocomplete-item" ) || ui.item.data( "item.autocomplete" );
var item = ui.item.data( "ui-autocomplete-item" );
if ( false !== this._trigger( "focus", event, { item: item } ) ) {
// use value to match what will end up in the input, if it was a key event
if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
@@ -255,9 +253,7 @@ $.widget( "ui.autocomplete", {
}
},
menuselect: function( event, ui ) {
// back compat for _renderItem using item.autocomplete, via #7810
// TODO remove the fallback, see #8156
var item = ui.item.data( "ui-autocomplete-item" ) || ui.item.data( "item.autocomplete" ),
var item = ui.item.data( "ui-autocomplete-item" ),
previous = this.previous;

// only trigger when focus was lost (click on menu)

0 comments on commit 9202bb7

Please sign in to comment.
You can’t perform that action at this time.