Skip to main content

Bug Tracker

Side navigation

#9467 closed bug (invalid)

Opened May 31, 2011 12:45PM UTC

Closed June 19, 2011 08:06AM UTC

Delegate with Custom Events working in Chrome but not Firefox

Reported by: Michael.Balazs@gmail.com Owned by: Michael.Balazs@gmail.com
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:
Description

Running the same code in both Firefox and Chrome, the event callback is run in Chrome but not Firefox. This works fine in 1.4.2 in both browsers. Working through the propagation of the trigger, the issue appears to be with

var handle = jQuery._data( cur, "handle" );

in the jQuery.event.trigger method. It fails to ever return a handler. Digging deeper, in the data function called by _data,

id = isNode ? elem[ jQuery.expando ] : elem[ jQuery.expando ] && jQuery.expando;

returns a valid id in Chrome but undefined in Firefox b/c elem[ jQuery.expando ] is undefined. This causes the next block of code

if ( (!id || (pvt && id && !cache[ id ][ internalKey ])) && getByName && data === undefined ) {
			return;
		}

To always return.

Thanks for looking into this.

Attachments (0)
Change History (8)

Changed June 01, 2011 06:11PM UTC by dmethvin comment:1

owner: → Michael.Balazs@gmail.com
status: newpending

I'd like to look into this. Can you provide a simple test case in jsFiddle? Thanks!

Changed June 03, 2011 01:18AM UTC by Michael.Balazs@gmail.com comment:2

status: pendingnew

Hello!

So I have been working on on this a bit more and the results are a bit strange and I don't have the issue in jsFiddle. Here is what I see...

>>> window.$("#canvas_frame").contents().find(".Bu:has(.zA.yO, .zA.zE)") === window.$("#canvas_frame").contents().find("[element_name='centersection']")
false
>>> window.$("#canvas_frame").contents().find(".Bu:has(.zA.yO, .zA.zE)")
[td.Bu]
>>> window.$("#canvas_frame").contents().find("[element_name='centersection']")
[td.Bu]
>>> window.$("#canvas_frame").contents().find(".Bu:has(.zA.yO, .zA.zE)").attr("element_name")
"centersection"
>>> window.$("#canvas_frame").contents().find("[i2element_name='centersection']").attr("i2element_name")
"centersection"
>>> window.$("#canvas_frame").contents().find(".Bu:has(.zA.yO, .zA.zE)").data()
Object { jQuery16107871039124492715={...}}
>>> window.$("#canvas_frame").contents().find("[element_name='centersection']").data()
Object {}

The two elements are the same DOM element but when found one way it shows the data on the object but when found by attribute it fails. Thanks for the help.

Michael

Changed June 03, 2011 01:30AM UTC by anonymous comment:3

I should add I am working in a sand-boxed environment in Firefox.

Michael

Replying to [comment:2 Michael.Balazs@…]:

Hello! So I have been working on on this a bit more and the results are a bit strange and I don't have the issue in jsFiddle. Here is what I see...
> >>> window.$("#canvas_frame").contents().find(".Bu:has(.zA.yO, .zA.zE)") === window.$("#canvas_frame").contents().find("[element_name='centersection']")
> false
> >>> window.$("#canvas_frame").contents().find(".Bu:has(.zA.yO, .zA.zE)")
> [td.Bu]
> >>> window.$("#canvas_frame").contents().find("[element_name='centersection']")
> [td.Bu]
> >>> window.$("#canvas_frame").contents().find(".Bu:has(.zA.yO, .zA.zE)").attr("element_name")
> "centersection"
> >>> window.$("#canvas_frame").contents().find("[i2element_name='centersection']").attr("i2element_name")
> "centersection"
> >>> window.$("#canvas_frame").contents().find(".Bu:has(.zA.yO, .zA.zE)").data()
> Object { jQuery16107871039124492715={...}}
> >>> window.$("#canvas_frame").contents().find("[element_name='centersection']").data()
> Object {}
> 
The two elements are the same DOM element but when found one way it shows the data on the object but when found by attribute it fails. Thanks for the help. Michael

Changed June 04, 2011 05:11PM UTC by dmethvin comment:4

status: newpending
I am working in a sand-boxed environment in Firefox.

Can you say more about what you mean? It's not a standard browser environment? Is is some sort of embedded browser? What does the markup look like?

Changed June 04, 2011 05:16PM UTC by Michael.Balazs@gmail.com comment:5

status: pendingnew

Replying to [comment:4 dmethvin]:

> I am working in a sand-boxed environment in Firefox. Can you say more about what you mean? It's not a standard browser environment? Is is some sort of embedded browser? What does the markup look like?

Hi dmethvin,

I am happy to share more info with you but we do it in a non-public space. Please shoot me an email it should be attached to the ticket.

Michael

Changed June 04, 2011 05:28PM UTC by dmethvin comment:6

Sorry Michael, but we need to do our bug triage in the open. If the code is a proprietary/closed project then we'd be unable to test there anyway and couldn't guarantee support for the environment.

Changed June 04, 2011 05:34PM UTC by dmethvin comment:7

status: newpending

Changed June 19, 2011 08:06AM UTC by trac-o-bot comment:8

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!