-
Notifications
You must be signed in to change notification settings - Fork 141
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
version 1.8 seems not to work on <select><option> with empty value #55
Comments
I can verify that this problem exists in 1.8.0. Create a form with a select box; make the select box's default value blank. When the select box is changed to a different (non-blank) value, the "dirty" event is not fired. (Testing in Firefox 31, the select box's "onchange" event DOES still fire. Changing other input fields on the form still fires the "dirty" event.) This problem does not occur when the select box has a non-blank value to start with. |
I agree. It seems like code is mistakenly takes blank value with undefined. Earlier version 1.5 does not have this issue. |
Someone should consider merging this in. We are having this problem. I just decided to do the hard code change in our local file since I can't wait for this to be merged in. Did notice that with the change, if you change the value from a blank value, it fires the dirty event, but if you change it back to the value that it was upon loading the page, it doesn't fire a clean event. |
Hi Guys, Sorry about being offline for a few days. I agree. There is already a related change in the 1.9-dev branch. I'll look at releasing 1.9 and ensuring the use-case outlined here is also address. Just a git of history: In older versions of Are-You-Sure, we handled selects by converting to a string manually by looping through selected elements and concatenating a string. This code was a bit hacky but worked. It was cleaned up to use the .val() array return - this removed about 15 lines. The downside has been a few side-effect related bugs. |
I did a bit of testing and playing around with a few alternate solutions. I've decided to revert select handling back to the 1.7 logic. It's a little more complicated, but it works on all versions of jquery back to 1.4 and stood the test of time for the past few years. I agree this is an annoying bug so I'll push version 1.9 today. |
This has corrected the problem for me. Thanks! |
when using version 1.7 from the demo all works as expected, in version 1.8 changes on select are not captured?
mycode:
Select Adama Greystone
The text was updated successfully, but these errors were encountered: