Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#5719 closed bug (notabug)

Autocomplete: no-longer able to clear field value in change:

Reported by: netnak Owned by:
Priority: minor Milestone:
Component: ui.autocomplete Version: 1.8.2
Keywords: autocomplete, clear, change Cc:
Blocked by: Blocking:

Description

With version 1.8, clearing an input field after an autocomplete selection in the "change:" event worked fine.

In version 1.8.2 the field has to lose focus before the field value is cleared.

Which is the correct behaviour?

$(function(){

var tags = ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby", "python", "c", "scala", "groovy", "haskell", "perl"]; $("#selector").autocomplete({

source: tags,

select: function(e, ui) {

var selectedvalue = ui.item.value;

$("#selection").html(selectedvalue);

},

change: function() {

$("#selector").val("");

}

});

});

Change History (2)

comment:1 Changed 9 years ago by Scott González

Resolution: invalid
Status: newclosed

The current behavior is intended. You can get the previous behavior by clearing the text field and canceling the select event. In the future, if you're unsure if something is a bug, please use the forums.

comment:2 Changed 7 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.