Skip to main content

Bug Tracker

Side navigation

#3138 closed bug (invalid)

Opened July 07, 2008 02:00PM UTC

Closed October 13, 2009 12:09AM UTC

[autocomplete] plugin - result handler not called when exact match is typed

Reported by: colin.johnson Owned by: joern
Priority: major Milestone: 1.3
Component: plugin Version: 1.2.6
Keywords: Cc:
Blocked by: Blocking:
Description

With autocomplete plugin version 1.0.2 I have bound a result handler to the autocomplete textfield, in order to update a hidden id field with the selected item. The result handler is not currently called when an exact match is typed into the field and the focus moved out of the autocomplete textfield via a mouse click (it does call it when you tab/enter in the textfield).

Attachments (0)
Change History (3)

Changed July 07, 2008 02:36PM UTC by colin.johnso comment:1

Replying to [ticket:3138 colin.johnson]:

With autocomplete plugin version 1.0.2 I have bound a result handler to the autocomplete textfield, in order to update a hidden id field with the selected item. The result handler is not currently called when an exact match is typed into the field and the focus moved out of the autocomplete textfield via a mouse click (it does call it when you tab/enter in the textfield).

Not sure of the implications of this change yet but I have implemented a change to the hideResultsNow() function, adding an else on line 305, so if we DO have a result match, then trigger the result handler:

	if ( !result ) {
		... 
		code to empty the input box because no match
		...
	} else {
		// fire the result handler
		$input.trigger("result", result && [result.data, result.value]);
	}

Implications of the change might be that we call the result trigger multple times?

Hope this provides some help.

Thanks

Colin

Changed July 07, 2008 11:46PM UTC by flesler comment:2

owner: → joern

Changed October 13, 2009 12:09AM UTC by dmethvin comment:3

resolution: → invalid
status: newclosed

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 .