Side navigation
#7808 closed bug (wontfix)
Opened December 19, 2010 09:47PM UTC
Closed December 20, 2010 05:59PM UTC
Last modified May 02, 2012 12:48AM UTC
META: Investigate Event Object Creation
Reported by: | rwaldron | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | 1.6 |
Component: | core | Version: | 1.4.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Currently, if I want to access a special type of event property, such as the dataTransfer
property (exists when a file is dropped onto an element that has the "drop" event bound to it), I must look in the event.originalEvent object, otherwise specify its existence with $.event.props.push('dataTransfer');
.
This ticket should exist merely for discussion pertaining to the reasons why all properties of the host event object aren't copied to the new event object. I'm sure there might be a perfectly reasonable explanation, so allow this ticket to be a place to clarify.
Attachments (0)
Change History (10)
Changed December 19, 2010 09:47PM UTC by comment:1
component: | unfiled → core |
---|
Changed December 19, 2010 09:57PM UTC by comment:2
Boaz Sender provided an example of this, with which i reduced to this fiddle:
Changed December 19, 2010 10:00PM UTC by comment:3
Previous discussion about this issue can be found here: #1871 and here http://groups.google.com/group/jquery-dev/browse_thread/thread/cc768c85d5514098
Thanks to iliakan for tracking these down
Changed December 19, 2010 10:08PM UTC by comment:4
_comment0: | Go http://jsfiddle.net/x34BM/ to test the performance. → 1292796581520700 |
---|---|
_comment1: | Go http://jsfiddle.net/x34BM/ to test the performance. For me the difference is 1.5x - 2x. Not as large as it was for FF in the thread though. → 1292796752099535 |
_comment2: | Go http://jsfiddle.net/x34BM/1/ to test the performance. For me the difference is 1.5x - 2x. Not as large as it was for FF in the thread though. → 1292796789046532 |
Go http://jsfiddle.net/x34BM/2/ to test the performance. For me the difference is 1.5x - 2x. Not as large as it was for FF in the thread though.
Changed December 19, 2010 11:13PM UTC by comment:5
Relevant discussion here too :
Changed December 19, 2010 11:18PM UTC by comment:6
Paul beat me to it ....
Normalizing the event data is expensive, so we want to touch/copy/normalize as little as possible. We had lots of discussion about the problem there.
Maybe we can resurrect Mike Helgeson's solution for 1.5? It won't help IE but might be worth it for the others.
Changed December 20, 2010 05:59PM UTC by comment:7
resolution: | → wontfix |
---|---|
status: | new → closed |
Changed May 01, 2012 09:55PM UTC by comment:9
Why can't the originalEvent be the prototype for the jQuery event? It seems like that would solve the performance issue, and provide convenient access to event properties.
Changed May 02, 2012 12:48AM UTC by comment:10
@dilvie, give it a try on all our supported browsers and I think you'll get your answer.