Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#11665 closed bug (duplicate)


Reported by: prince_ppy Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:


I was following jquery from 1.5, in my websites. recently I havejust updated with 1.7.2 in my development thinking that I can use latest features to make site work better, the site started breaking.

After analysing I found that the "attr" function is the problem center. if I switch back to 1.7.1 jquery the code $(this).attr("for") => will give me "divMain" and if I switch to 1.7.2 the same code is giving as [object].

I have downloaded the development version of both 1.7.1 & 1.7.2 and found that the problem is in jquery 1.7.2.js line number 2227 "return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );". I found out that for a code "$(this).attr('for')" the arguments.length = 3, again I looks at arguments.length regardless of whether the last argument was undefined, so if you make a function that passes all of it's arguments to .attr, it would fail.

May be when some other js code override attr function, it may be always send arguments more the one, then code's behind: return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); will go not correctly, it deal as chainable. the other auguments will be undefined. it has no problem in jquery version 1.6.2. i don't know if it should let other changing their code or change the jquery core.

So what am saying is that "with out any change in code of file in my project, if I Switch the the new verion of jquery (1.7.2). the site breaks. So their are some very minner problems.

Change History (5)

comment:1 Changed 11 years ago by mikesherov

Resolution: duplicate
Status: newclosed

Sounds like you need to update your TinyMCE.

comment:2 Changed 11 years ago by mikesherov

Duplicate of #11527.

comment:3 Changed 11 years ago by prince_ppy

Am not using TinyMCE. You may think only you are smart. If you don't know how to solve it tell us we will find a way. But don't tell that we can't understand.

I am putting an open challenge that I can prove that the error is from your site.

comment:4 Changed 11 years ago by Rick Waldron

There is no reason for the aggressive comments. Please provide a reduced test case on http://jsfiddle.net that reproduces the issue

comment:5 Changed 11 years ago by anonymous

Similar problem here. $(this).attr('rel') returns an object instead of the rel value.

Note: See TracTickets for help on using tickets.