Skip to main content

Bug Tracker

Side navigation

#2959 closed bug (wontfix)

Opened May 29, 2008 06:43PM UTC

Closed July 18, 2008 08:03PM UTC

Last modified March 14, 2012 10:00PM UTC

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:
Description

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)
Change History (3)

Changed May 29, 2008 06:46PM UTC by phil comment:1

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

Changed May 29, 2008 11:01PM UTC by flesler comment:2

need: ReviewCommit
owner: → 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.

Changed July 18, 2008 08:03PM UTC by flesler comment:3

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.