Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#8666 closed bug (invalid)

Firefox evaluates "+ ++" as "+++" resulting in invalid operand

Reported by: shazamfu Owned by: shazamfu
Priority: minor Milestone: 1.10.0
Component: ui.core Version: 1.9.0
Keywords: Cc:
Blocked by: Blocking:

Description

Hi, I just upgraded our jquery-ui file from 1.8.23 to 1.9.0 & found that one of our components was not working in firefox. The error console points to this function:

uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})}

+ ++ is turning into +++ in firefox and is being caught as an invalid operand, breaking the code. It doesn't generate any errors in IE, Chrome, or Safari.

I've reverted to 1.8.23 in the meantime.

Change History (9)

comment:1 Changed 7 years ago by Scott González

Owner: set to shazamfu
Status: newpending

I'm not seeing any errors: http://jsbin.com/iniriz/2/edit What version of Firefox are you using? What OS?

comment:2 Changed 7 years ago by shazamfu

Status: pendingnew

Sorry, I see the error in Firefox 15.0.1 on Windows 7 and on a Mac (reported by someone else, not sure what OS). I was using jquery 1.8.2 with jquery-ui 1.9.0.

Is there a place where I can see all of the changes made between jquery-ui 1.8.23 and 1.9.0? I can check my jquery code to see if anything I'm doing has been deprecated.

Last edited 7 years ago by shazamfu (previous) (diff)

comment:3 Changed 7 years ago by Scott González

Status: newpending

I just tested Firefox 15 on Windows 7 with the jsbin that I created and I'm not getting any errors. Do you get errors on that page?

As for changes, see the changelog and upgrade guide.

comment:4 Changed 7 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

comment:5 Changed 6 years ago by Scott González

#8933 is a duplicate of this ticket.

comment:6 Changed 6 years ago by Scott González

#9115 is a duplicate of this ticket.

comment:7 Changed 6 years ago by sara.oneal

This ticket is marked and closed: invalid. What does that mean? I have verion 1.10.0 and this issue is still there.

comment:8 Changed 6 years ago by Scott González

It means that nobody on the jQuery team has been able to reproduce this. Can you provide a page that reliably fails along with browser and OS information?

comment:9 Changed 6 years ago by jayawiperera

I encountered the same issue where I get a syntax error because of +++. I resolved this by placing the ++n within parentheses . I do suspect that this issue might be caused by Minify.

Edit: I was using version 2.1.3 of Minify earlier. Testing with version 2.1.5 of Minify, I don't get the issue anymore.

Last edited 6 years ago by jayawiperera (previous) (diff)
Note: See TracTickets for help on using tickets.