Skip to content

Commit 26a60ed

Browse files
committed
Event: Use event.originalEvent instead of modifying jQuery.event.props
Fixes: #405
1 parent d24fc66 commit 26a60ed

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

categories.xml

+6-7
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ var e = jQuery.Event( "keydown", { keyCode: 64 } );
120120
// trigger an artificial keydown event with keyCode 64
121121
jQuery( "body" ).trigger( e );
122122
</code></pre>
123-
<h4>Event Properties</h4>
123+
<h4>Common Event Properties</h4>
124124
<p>jQuery normalizes the following properties for cross-browser consistency:</p>
125125
<ul>
126126
<li>
@@ -144,13 +144,12 @@ jQuery( "body" ).trigger( e );
144144
</ul>
145145
<p>The following properties are also copied to the event object, though some of their values may be undefined depending on the event:</p>
146146
<p>altKey, bubbles, button, buttons, cancelable, char, charCode, clientX, clientY, ctrlKey, currentTarget, data, detail, eventPhase, key, keyCode, metaKey, offsetX, offsetY, originalTarget, pageX, pageY, relatedTarget, screenX, screenY, shiftKey, target, toElement, view, which</p>
147-
<h4>OtherProperties</h4>
148-
<p>Certain events may have properties specific to them. Those can be accessed as properties of the <code>event.originalEvent</code> object.</p>
149-
<p>Example:</p>
147+
<h4>Other Properties</h4>
148+
<p>To access event properties not listed above, use the <code>event.originalEvent</code> object:</p>
150149
<pre><code>
151-
// add the dataTransfer property for use with the native `drop` event
152-
// to capture information about files dropped into the browser window
153-
jQuery.event.props.push( "dataTransfer" );
150+
// Access the `dataTransfer` event from the `drop` event, which
151+
// holds the files dropped into the browser window.
152+
var files = event.originalEvent.dataTransfer.files;
154153
</code></pre>
155154
</div>
156155
]]></desc>

0 commit comments

Comments
 (0)