Minified jQuery UI 1.8 and using Rails asset cache plugin

Minified jQuery UI 1.8 and using Rails asset cache plugin

We recently upgraded the jQuery UI from 1.7 to 1.8 and ran into an issue with it and our Rails asset cacheing plugin called Smurf. When the assets were combined into one file after running through the plugin (which strips comments, unnecessary line breaks, etc) all jQuery would break in Firefox while running just fine in Safari and IE. Come to find out, the issue was with the Date picker plugin.

After a good deal of combing through the code of the library and to see what was different from the cached and uncached version, the issue was with how a variable was being incremented. In the Date picker plugin code in two spots there is:

  1. a.id="dp"+ ++this.uuid;
When running it through our asset packager, it removed the space between the + + thus creating a bad incremental operand that Firefox did not understand.

To get around this I did:

  1. a.id="dp"+ (++this.uuid);
Not sure if this breaks anything in the picker, but it lets Firefox get around the issue. I am assuming this initial output is from the the Ymin did. This line must have changed from 1.7 to 1.8.