Ticket #9467 (closed bug: invalid)
Delegate with Custom Events working in Chrome but not Firefox
| Reported by: | Michael.Balazs@… | Owned by: | Michael.Balazs@… |
|---|---|---|---|
| Priority: | undecided | Milestone: | 1.next |
| Component: | unfiled | Version: | 1.6.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
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.
Change History
comment:1 Changed 2 years ago by dmethvin
- Owner set to Michael.Balazs@…
- Status changed from new to pending
comment:2 follow-up: ↓ 3 Changed 2 years ago by Michael.Balazs@…
- Status changed from pending to new
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
comment:3 in reply to: ↑ 2 Changed 2 years ago by anonymous
I should add I am working in a sand-boxed environment in Firefox.
Michael
Replying to 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
comment:4 follow-up: ↓ 5 Changed 2 years ago by dmethvin
- Status changed from new to pending
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?
comment:5 in reply to: ↑ 4 Changed 2 years ago by Michael.Balazs@…
- Status changed from pending to new
Replying to 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
comment:6 Changed 2 years ago by dmethvin
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.
comment:8 Changed 2 years 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!
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

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