Bug Tracker

Modify

Ticket #7665 (closed bug: worksforme)

Opened 2 years ago

Last modified 2 years ago

$.fn.data broken in jQuery 1.4.4 (related to pulling HTML5 data- attributes)

Reported by: cobexer Owned by: cobexer
Priority: high Milestone: 1.5
Component: data Version: 1.5
Keywords: Cc:
Blocking: Blocked by:

Description

in jQuery 1.4.4 calling $(window).data() results in an error same for document(and everything that has no attributes property)

Change History

comment:1 Changed 2 years ago by rwaldron

  • Owner set to cobexer
  • Status changed from new to pending

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced jsFiddle test case to help us assess your ticket!

Additionally, test against the latest jQuery release AND the jQuery 0 GIT version to ensure the issue still exists. Be Excellent to eachother!

comment:2 Changed 2 years ago by jitter

Duplicate of #7500?

comment:3 Changed 2 years ago by rwaldron

  • Status changed from pending to closed
  • Resolution set to duplicate

It sure is. Thanks Jitter

 http://jsfiddle.net/rwaldron/tGHc5/3/

comment:4 Changed 2 years ago by rwaldron

Duplicate of #7500.

comment:5 Changed 2 years ago by cobexer

I now added  https://github.com/jquery/jquery/pull/115 to fix this, then realized it was closed as duplicate however the other tickets (and the linked commits) do not seem to cover this.

please have a look at the changes i made

comment:6 Changed 2 years ago by jitter

  • Status changed from closed to reopened
  • Resolution duplicate deleted

comment:7 Changed 2 years ago by jitter

  • Priority changed from undecided to high
  • Status changed from reopened to open
  • Component changed from unfiled to data
  • Milestone changed from 1.next to 1.4.5

comment:8 Changed 2 years ago by jitter

  • Status changed from open to assigned

comment:9 Changed 2 years ago by rwaldron

Nice catch

comment:10 Changed 2 years ago by john

  • Status changed from assigned to pending

The approach taken in #7500 is certainly different but it covers the case handled here (and in a much better way). Can you please re-test now that the code is landed? Thanks!

comment:11 Changed 2 years ago by rwaldron

  • Status changed from pending to closed
  • Resolution set to worksforme

I just ran the test against all the supported browsers using jQuery 0 GIT and it no longer throws an exception.

comment:12 Changed 2 years ago by john

  • Version changed from 1.4.4 to 1.5

There wasn't a 1.4.5 release, was actually 1.5.

comment:13 Changed 2 years ago by john

  • Milestone changed from 1.4.5 to 1.5

There was no 1.4.5 release, was actually 1.5.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.