Bug Tracker

Modify

Ticket #10560 (closed bug: invalid)

Opened 20 months ago

Last modified 19 months ago

removeData failing on line 1821 using "in" on true which is not an object

Reported by: mail.dwat001@… Owned by: mail.dwat001@…
Priority: undecided Milestone: 1.next
Component: data Version: git
Keywords: Cc:
Blocking: Blocked by:

Description

Using the Edge version of jQuery I'm getting an error on line 1821 in function removeData

the line in question is } else if ( name in thisCache ) { (put in context below)

In this case thisCache === true which is not an object so cannot have the in keyword applied to it.

Browsers Tested Firefox 6.0.2 Chrome 14 IE 9

Steps to reproduce: Navigate to  http://jsfiddle.net/dwat001/SYQJA/20/show/ Click on one of the markers on the map in the resulting infoWindow mouseover one of the small images Move mouse out of larger image ERROR

Line in context: Support space separated names if ( jQuery.isArray( name ) ) { name = name; } else if ( name in thisCache ) { name = [ name ]; } else { split the camel cased version by spaces name = jQuery.camelCase( name ); if ( name in thisCache ) { name = [ name ]; } else { name = name.split( " " ); } }

Change History

comment:1 Changed 20 months ago by dmethvin

  • Owner set to mail.dwat001@…
  • Status changed from new to pending

Can you create a reduced test case? How did thisCache get to be true?

comment:2 Changed 20 months ago by trac-o-bot

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

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!

comment:3 Changed 19 months ago by anonymous

Hi Sorry for the delay in updating this, I have created a fiddle which is far more cut down at  http://jsfiddle.net/dwat001/yrdX9/13/ the HTML is still complex (produced by google maps then inspected and cut down by hand) the error still occurs at the same point.

To reproduce navigate to  http://jsfiddle.net/dwat001/yrdX9/13/show/ mouse over image in white info box, on mouse out you will see this error.

Line numbers are at

jQuery JavaScript Library v1.7.2pre Live From Git (d511613d748a92af04a3f07943f34f9baadc4153)

Uncaught TypeError: Cannot use 'in' operator to search for 'fxqueue fx.run' in true jQuery.extend.removeDatajquery-git.js:1782 jQuery.extend.dequeuejquery-git.js:2072 jQuery.fn.extend.queuejquery-git.js:2092 jQuery.extend.eachjquery-git.js:658 jQuery.fn.jQuery.eachjquery-git.js:271 jQuery.fn.extend.queuejquery-git.js:2088 jQuery.fn.extend.animatejquery-git.js:8468 $.hover.url/dwat001/yrdX9/13/show/:165 jQuery.each.jQuery.event.special.(anonymous function).handlejquery-git.js:3535 jQuery.event.dispatchjquery-git.js:3256 jQuery.event.add.elemData.handle.eventHandlejquery-git.js:2875

looking at the function removeData the parameter elem appares to be an event so

isNode = elem.nodeType, See jQuery.data for more information cache = isNode ? jQuery.cache : elem,

sets cache to elem. as you can see below elem has a property for a jQueryId and its value is true.

elem ===

altKey

false

attrChange

undefined

attrName

undefined

bubbles

true

button

0

buttons

undefined

cancelable

true

clientX

166

clientY

426

ctrlKey

false

currentTarget

img#floating-image 64148170...aebd.jpg

data

null

delegateTarget

img#floating-image 64148170...aebd.jpg

eventPhase

2

fromElement

undefined

handleObj

Object { type="mouseout", origType="mouseleave", guid=1, more...}

jQuery1725116137489204307943349415306040639041365081

true

metaKey

false

offsetX

undefined

offsetY

undefined

originalEvent

mouseout clientX=166, clientY=426

pageX

166

pageY

426

relatedNode

undefined

relatedTarget

img kh?v=99&...martmaps

screenX

166

screenY

563

shiftKey

false

srcElement

undefined

target

img#floating-image 64148170...aebd.jpg

timeStamp

0

toElement

undefined

type

"mouseleave"

view

Window /dwat001/yrdX9/12/show/

which

1

isDefaultPrevented

returnFalse()

isImmediatePropagationStopped

returnFalse()

isPropagationStopped

returnFalse()

preventDefault

function()

stopImmediatePropagation

function()

stopPropagation

function()

proto

Object { preventDefault=function(), stopPropagation=function(), stopImmediatePropagation=function(), more...}

comment:4 Changed 19 months ago by rwaldron

  • Status changed from closed to reopened
  • Resolution invalid deleted

comment:5 Changed 19 months ago by rwaldron

  • Component changed from unfiled to data
  • Milestone changed from None to 1.next

I'm not sure if this is valid or not, just reopening as a reminder to look deeper tomorrow

comment:6 Changed 19 months ago by dmethvin

  • Status changed from reopened to closed
  • Resolution set to invalid

$("#floating-image").mouseleave(function(image) {

An event handler gets an event object, not a reference to the element.

compleate: hideZoomImageNow

That is not the correct spelling of "complete".

Please ask for help in the forums if you need it.

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.