Bug Tracker

Opened 15 years ago

Closed 15 years ago

Last modified 11 years ago

#2959 closed bug (wontfix)

attr() broken in jQuery 1.2.6?

Reported by: phil Owned by: flesler
Priority: minor Milestone: 1.3
Component: core Version: 1.2.5
Keywords: Cc:
Blocked by: Blocking:


I'm having a problem using element.attr() ever since I upgraded to jquery 1.2.6. I know this issue doesn't exist in 1.2.4 (I've tested it).

Basically, calling element.attr(name, value) doesn't appear to do anything. I've attached a minimal HTML file that illustrates this issue. The page consists of a one-button form, and a separate button marked 'configure'. An alert will pop up if the behavior is incorrect.

Attachments (2)

jquery-attr-bug.html (846 bytes) - added by phil 15 years ago.
attr-form.diff (2.5 KB) - added by flesler 15 years ago.

Download all attachments as: .zip

Change History (5)

Changed 15 years ago by phil

Attachment: jquery-attr-bug.html added

comment:1 Changed 15 years ago by phil

Oh, I've only tested this with Firefox on Mac OS X 10.5.3, if it matters.

Changed 15 years ago by flesler

Attachment: attr-form.diff added

comment:2 Changed 15 years ago by flesler

need: ReviewCommit
Owner: set to flesler
Priority: majorminor
Status: newassigned

The patch about should modify attr() so that it supports this situation. It won't be applied for now for 2 reasons:

1- The demo you showed doesn't work cross browser. As far as I tested, IE doesn't fire handlers set as strings with javascript. So there's no point in supporting that. 2- It needs a lot more of testing. Our test runner doesn't fail with this patch, but as attr() went to many changes lately, we'll give it special attention before modifying it again.

Thanks for reporting.

comment:3 Changed 15 years ago by flesler

Resolution: wontfix
Status: assignedclosed

This test case isn't good enough, but the issue is indeed valid. I'll close this ticket and move the patch to #3113 that provides a consistent problem.

Note: See TracTickets for help on using tickets.