Bug Tracker

Opened 8 years ago

Closed 7 years ago

#10560 closed bug (invalid)

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:
Blocked by: Blocking:

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 (6)

comment:1 Changed 8 years ago by dmethvin

Owner: set to mail.dwat001@…
Status: newpending

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

comment:2 Changed 8 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!

comment:3 Changed 7 years 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 7 years ago by Rick Waldron

Resolution: invalid
Status: closedreopened

comment:5 Changed 7 years ago by Rick Waldron

Component: unfileddata
Milestone: None1.next

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

comment:6 Changed 7 years ago by dmethvin

Resolution: invalid
Status: reopenedclosed

$("#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.

Note: See TracTickets for help on using tickets.