Side navigation
#4866 closed bug (invalid)
Opened July 07, 2009 07:17PM UTC
Closed October 13, 2009 12:01AM UTC
Last modified March 15, 2012 04:18PM UTC
[autocomplete] Doesn't Trigger change Event
Reported by: | gtwilliams | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.4 |
Component: | plugin | Version: | 1.3.2 |
Keywords: | autocomplete plugin change event | Cc: | |
Blocked by: | Blocking: |
Description
When user selects a value in the select list using the mouse, a change event is triggered for the autocomplete input field because of blur. But this change event will yield the typed-in value from the input field. The autocomplete plugin changes the value right after that to the user's selected string. Unfortunately, this does not trigger another change event.
I need to catch change, but I only see the typed-in value. I can ignore this event, but to get the selected value associated with a change event, I modified the plugin to trigger change when the user's selection is stored. (It would be nice to be able to suppress the change event on click of selection choice but I don't know how to do that.)
Here's the patch which starts around line 213:
$input.val(v);
hideResultsNow();
+ $input.trigger("change");
$input.trigger("result", [selected.data, selected.value]);
return true;
Attachments (0)
Change History (1)
Changed October 13, 2009 12:01AM UTC by comment:1
resolution: | → invalid |
---|---|
status: | new → closed |
This is not a jQuery core bug. Please report plugin bugs to the plugin's author, or ask on the jQuery forums. jQuery UI bugs should be reported on the UI bug tracker, http://dev.jqueryui.com .