| @@ 5299-5343 (lines=45) @@ | ||
| 5296 | return handlerQueue; |
|
| 5297 | }, |
|
| 5298 | ||
| 5299 | fix: function( event ) { |
|
| 5300 | if ( event[ jQuery.expando ] ) { |
|
| 5301 | return event; |
|
| 5302 | } |
|
| 5303 | ||
| 5304 | // Create a writable copy of the event object and normalize some properties |
|
| 5305 | var i, prop, copy, |
|
| 5306 | type = event.type, |
|
| 5307 | originalEvent = event, |
|
| 5308 | fixHook = this.fixHooks[ type ]; |
|
| 5309 | ||
| 5310 | if ( !fixHook ) { |
|
| 5311 | this.fixHooks[ type ] = fixHook = |
|
| 5312 | rmouseEvent.test( type ) ? this.mouseHooks : |
|
| 5313 | rkeyEvent.test( type ) ? this.keyHooks : |
|
| 5314 | {}; |
|
| 5315 | } |
|
| 5316 | copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; |
|
| 5317 | ||
| 5318 | event = new jQuery.Event( originalEvent ); |
|
| 5319 | ||
| 5320 | i = copy.length; |
|
| 5321 | while ( i-- ) { |
|
| 5322 | prop = copy[ i ]; |
|
| 5323 | event[ prop ] = originalEvent[ prop ]; |
|
| 5324 | } |
|
| 5325 | ||
| 5326 | // Support: IE<9 |
|
| 5327 | // Fix target property (#1925) |
|
| 5328 | if ( !event.target ) { |
|
| 5329 | event.target = originalEvent.srcElement || document; |
|
| 5330 | } |
|
| 5331 | ||
| 5332 | // Support: Safari 6-8+ |
|
| 5333 | // Target should not be a text node (#504, #13143) |
|
| 5334 | if ( event.target.nodeType === 3 ) { |
|
| 5335 | event.target = event.target.parentNode; |
|
| 5336 | } |
|
| 5337 | ||
| 5338 | // Support: IE<9 |
|
| 5339 | // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) |
|
| 5340 | event.metaKey = !!event.metaKey; |
|
| 5341 | ||
| 5342 | return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; |
|
| 5343 | }, |
|
| 5344 | ||
| 5345 | // Includes some event props shared by KeyEvent and MouseEvent |
|
| 5346 | props: ( "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " + |
|
| @@ 4853-4893 (lines=41) @@ | ||
| 4850 | } |
|
| 4851 | }, |
|
| 4852 | ||
| 4853 | fix: function( event ) { |
|
| 4854 | if ( event[ jQuery.expando ] ) { |
|
| 4855 | return event; |
|
| 4856 | } |
|
| 4857 | ||
| 4858 | // Create a writable copy of the event object and normalize some properties |
|
| 4859 | var i, prop, copy, |
|
| 4860 | type = event.type, |
|
| 4861 | originalEvent = event, |
|
| 4862 | fixHook = this.fixHooks[ type ]; |
|
| 4863 | ||
| 4864 | if ( !fixHook ) { |
|
| 4865 | this.fixHooks[ type ] = fixHook = |
|
| 4866 | rmouseEvent.test( type ) ? this.mouseHooks : |
|
| 4867 | rkeyEvent.test( type ) ? this.keyHooks : |
|
| 4868 | {}; |
|
| 4869 | } |
|
| 4870 | copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; |
|
| 4871 | ||
| 4872 | event = new jQuery.Event( originalEvent ); |
|
| 4873 | ||
| 4874 | i = copy.length; |
|
| 4875 | while ( i-- ) { |
|
| 4876 | prop = copy[ i ]; |
|
| 4877 | event[ prop ] = originalEvent[ prop ]; |
|
| 4878 | } |
|
| 4879 | ||
| 4880 | // Support: Cordova 2.5 (WebKit) (#13255) |
|
| 4881 | // All events should have a target; Cordova deviceready doesn't |
|
| 4882 | if ( !event.target ) { |
|
| 4883 | event.target = document; |
|
| 4884 | } |
|
| 4885 | ||
| 4886 | // Support: Safari 6.0+, Chrome<28 |
|
| 4887 | // Target should not be a text node (#504, #13143) |
|
| 4888 | if ( event.target.nodeType === 3 ) { |
|
| 4889 | event.target = event.target.parentNode; |
|
| 4890 | } |
|
| 4891 | ||
| 4892 | return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; |
|
| 4893 | }, |
|
| 4894 | ||
| 4895 | special: { |
|
| 4896 | load: { |
|
| @@ 4519-4559 (lines=41) @@ | ||
| 4516 | } |
|
| 4517 | }, |
|
| 4518 | ||
| 4519 | fix: function( event ) { |
|
| 4520 | if ( event[ jQuery.expando ] ) { |
|
| 4521 | return event; |
|
| 4522 | } |
|
| 4523 | ||
| 4524 | // Create a writable copy of the event object and normalize some properties |
|
| 4525 | var i, prop, copy, |
|
| 4526 | type = event.type, |
|
| 4527 | originalEvent = event, |
|
| 4528 | fixHook = this.fixHooks[ type ]; |
|
| 4529 | ||
| 4530 | if ( !fixHook ) { |
|
| 4531 | this.fixHooks[ type ] = fixHook = |
|
| 4532 | rmouseEvent.test( type ) ? this.mouseHooks : |
|
| 4533 | rkeyEvent.test( type ) ? this.keyHooks : |
|
| 4534 | {}; |
|
| 4535 | } |
|
| 4536 | copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; |
|
| 4537 | ||
| 4538 | event = new jQuery.Event( originalEvent ); |
|
| 4539 | ||
| 4540 | i = copy.length; |
|
| 4541 | while ( i-- ) { |
|
| 4542 | prop = copy[ i ]; |
|
| 4543 | event[ prop ] = originalEvent[ prop ]; |
|
| 4544 | } |
|
| 4545 | ||
| 4546 | // Support: Cordova 2.5 (WebKit) (#13255) |
|
| 4547 | // All events should have a target; Cordova deviceready doesn't |
|
| 4548 | if ( !event.target ) { |
|
| 4549 | event.target = document; |
|
| 4550 | } |
|
| 4551 | ||
| 4552 | // Support: Safari 6.0+, Chrome < 28 |
|
| 4553 | // Target should not be a text node (#504, #13143) |
|
| 4554 | if ( event.target.nodeType === 3 ) { |
|
| 4555 | event.target = event.target.parentNode; |
|
| 4556 | } |
|
| 4557 | ||
| 4558 | return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; |
|
| 4559 | }, |
|
| 4560 | ||
| 4561 | special: { |
|
| 4562 | load: { |
|