Skip to main content

Search and Top Navigation

#5719 closed bug (notabug)

Opened June 10, 2010 10:04PM UTC

Closed July 19, 2010 08:38PM UTC

Last modified October 11, 2012 09:15PM UTC

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("");

}

});

});

Attachments (0)
Change History (2)

Changed July 19, 2010 08:38PM UTC by scottgonzalez comment:1

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.

Changed October 11, 2012 09:15PM UTC by scottgonzalez comment:2

milestone: TBD

Milestone TBD deleted