7 Apr 2009 12:44 PM #1
In DateField, this function checks to see if a value is set to true, after which it sets it to true. Wait, huh? I think the author meant to have a NOT (!) operator in there. But since the code has never likely been tested since the condition never happens, I'm not sure what other problems it will have one fixed... it does on('select', ...) twice, etc. I think someone needs to have another look at this class.
this.afterInitial = true;
7 Apr 2009 12:48 PM #2
Haven't looked at it, but it could have been set to something besides false/undefined, and someone wants to typecast it explicitly to boolean true also.
7 Apr 2009 1:43 PM #3
I did a grep though all the source code and examples, and this is the only place it is found. I should have mentioned that before. My bad.
7 Apr 2009 1:59 PM #4
Thanks for bringing this to our attention, we'll have a look.Aaron Conran
7 Apr 2009 3:35 PM #5
- Join Date
- Apr 2007
- Sydney, Australia
- Vote Rating
Fixed, something a bit more sane is committed.Evan Trimboli
Twitter - @evantrimboli
Don't be afraid of the source code!
7 Apr 2009 3:47 PM #6
I am using DateField as a model for a ColorField, and was wondering what the reasoning is behind the turning off the event listeners when the menu is hidden? Not that it doesn't make sense, just that I don't see it happen elsewhere as a general pattern. Or I missed it. Could be that too...