Bug Tracker

Opened 12 years ago

Closed 11 years ago

#10031 closed bug (invalid)

.data() passing an object causes errors whereas passing each piece individually works perfectly

Reported by: stuart little Owned by: stuart little
Priority: low Milestone: 1.next
Component: data Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:


Hopefully this bug has not already been reported as I did do a search for it. I'm using a mac on OSX10.7 on Chrome 13.0.782.112 using jQuery 1.4.2

Here is my issue, I'm passing an object inside .data in many places throughout my application and it works beautifully. However when I'm about to close a dialog box I want to set some data. (I'm noting this as I did read that some plugins access .data() as well).

While setting the data with $('.currentlyClicked').data({

'boxColor':redact.preChangesObject.boxColor, 'borderColor':redact.preChangesObject.borderColor, 'fontSize':redact.preChangesObject.fontSize, 'fontColor':redact.preChangesObject.fontColor


I get multiple console errors referring to an unknown mousedown and click event.

However when I fill the data out like below: $('.currentlyClicked').data('boxColor',redact.preChangesObject.boxColor); $('.currentlyClicked').data('borderColor',redact.preChangesObject.borderColor); $('.currentlyClicked').data('fontSize',redact.preChangesObject.fontSize); $('.currentlyClicked').data('fontColor',redact.preChangesObject.fontColor);

everything works just fine

Change History (4)

comment:1 Changed 12 years ago by Rick Waldron

Component: unfileddata
Owner: set to stuart little
Priority: undecidedlow
Status: newpending

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

Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.

comment:2 Changed 12 years ago by Rick Waldron

Milestone: None1.6.3

comment:3 Changed 11 years ago by Rick Waldron

Milestone: 1.6.31.next

comment:4 Changed 11 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.