Ticket #8201 (closed bug: notabug)

Opened 14 months ago

Last modified 14 months ago

Event 'change' fires too early

Reported by: just-boris Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.autocomplete Version: 1.8.18
Keywords: Cc:
Blocking: Blocked by:

Description

I can't change value field on my text, because event change fires before changing value in this component. Example of code:  http://jsfiddle.net/yzRX8/7/ Steps: Select: "No tag option" Expected result: input field value become "No tag selected" Real result: input field value "No tag"

Change History

comment:1 Changed 14 months ago by scott.gonzalez

  • Status changed from new to closed
  • Resolution set to invalid

First of all, this has nothing to do with the change event. Second, as the documentation for the select event states "Canceling this event prevents the value from being updated, but does not prevent the menu from closing." Just add event.preventDefault() to your callback.

Note: See TracTickets for help on using tickets.