Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use selectedIndex instead of value for tracking change events. #1147

Merged
merged 3 commits into from Apr 18, 2013

Conversation

pfiller
Copy link
Contributor

@pfiller pfiller commented Apr 18, 2013

Fixes #1024 and #962

Technically, a change event on a native select fires when the selected option changes -- regardless of value. We should track the selectedIndex instead of value to do our best to match this behavior.

Note: this won't affect multiple select which already triggers a change event any time an option is selected or deselected.

@stof
Copy link
Collaborator

stof commented Apr 18, 2013

looks good to me (except that the compiled files are conflicting with the other merge you did)

@pfiller
Copy link
Contributor Author

pfiller commented Apr 18, 2013

The compiled files will get fixed when I merge master back in. Not sure how I did that, but here we are.

@stof
Copy link
Collaborator

stof commented Apr 18, 2013

@pfiller quite easy: you have not fetched the latest master branch before creating your feature branch

Conflicts:
	chosen/chosen.jquery.min.js
	chosen/chosen.proto.min.js
@pfiller
Copy link
Contributor Author

pfiller commented Apr 18, 2013

@stof I knew technically what happened. Just not sure how my fingers did that :-P

It's fixed.

Conflicts:
	chosen/chosen.jquery.min.js
	chosen/chosen.proto.js
	chosen/chosen.proto.min.js
pfiller added a commit that referenced this pull request Apr 18, 2013
Use selectedIndex instead of value for tracking change events.
@pfiller pfiller merged commit 1739cf7 into master Apr 18, 2013
@pfiller pfiller deleted the use-selectedIndex-for-change branch April 18, 2013 17:57
pfiller added a commit that referenced this pull request Apr 19, 2013
Better container reference #1151
Fix issue when destroying last choice #1149
Use selectedIndex for tracking change events. #1147
Better IE Disabling #1144
Dropdown use css positioning for top position #1143
Fix bug when deleting last item #1142
Percentage Width Support #1141
CSS Centering Fix #1120
Use New CoffeeScript #1125
Chosen License #1111
Update placeholder text with ``liszt:updated`` #1107
Fix strange event bubbling #1055
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change event not triggered if options do not have values
3 participants