Search and Top Navigation
#8201 closed bug (notabug)
Opened March 19, 2012 01:32PM UTC
Closed March 19, 2012 01:35PM UTC
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: | ||
Blocked by: | Blocking: |
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"
Attachments (0)
Change History (1)
Changed March 19, 2012 01:35PM UTC by comment:1
resolution: | → invalid |
---|---|
status: | new → closed |
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.