Bug Tracker

Ticket #2959 (closed bug: wontfix)

Opened 6 months ago

Last modified 4 months ago

attr() broken in jQuery 1.2.6?

Reported by: phil Assigned to: flesler
Type: bug Priority: minor
Milestone: 1.3 Component: core
Version: 1.2.5 Keywords:
Cc: Needs: Commit

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

jquery-attr-bug.html (0.8 kB) - added by phil 6 months ago.
attr-form.diff (2.5 kB) - added by flesler 6 months ago.

Change History

Changed 6 months ago by phil

Changed 6 months ago by phil

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

Changed 6 months ago by flesler

Changed 6 months ago by flesler

  • need changed from Review to Commit
  • owner set to flesler
  • status changed from new to assigned
  • priority changed from major to minor

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 4 months ago by flesler

  • status changed from assigned to closed
  • resolution set to wontfix

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.