Opened 12 years ago
Closed 12 years ago
#9467 closed bug (invalid)
Delegate with Custom Events working in Chrome but not Firefox
Reported by: | Owned by: | ||
---|---|---|---|
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.
Change History (8)
comment:1 Changed 12 years ago by
Owner: | set to [email protected]… |
---|---|
Status: | new → pending |
comment:2 follow-up: 3 Changed 12 years ago by
Status: | pending → 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 Changed 12 years ago by
I should add I am working in a sand-boxed environment in Firefox.
Michael
Replying to [email protected]…:
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 12 years ago by
Status: | new → 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 Changed 12 years ago by
Status: | pending → 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 12 years ago by
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:7 Changed 12 years ago by
Status: | new → pending |
---|
comment:8 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
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!
I'd like to look into this. Can you provide a simple test case in jsFiddle? Thanks!