| @@ 5246-5297 (lines=52) @@ | ||
| 5243 | return event.result; |
|
| 5244 | }, |
|
| 5245 | ||
| 5246 | handlers: function( event, handlers ) { |
|
| 5247 | var i, matches, sel, handleObj, |
|
| 5248 | handlerQueue = [], |
|
| 5249 | delegateCount = handlers.delegateCount, |
|
| 5250 | cur = event.target; |
|
| 5251 | ||
| 5252 | // Support (at least): Chrome, IE9 |
|
| 5253 | // Find delegate handlers |
|
| 5254 | // Black-hole SVG <use> instance trees (#13180) |
|
| 5255 | // |
|
| 5256 | // Support: Firefox<=42+ |
|
| 5257 | // Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343) |
|
| 5258 | if ( delegateCount && cur.nodeType && |
|
| 5259 | ( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) { |
|
| 5260 | ||
| 5261 | /* jshint eqeqeq: false */ |
|
| 5262 | for ( ; cur != this; cur = cur.parentNode || this ) { |
|
| 5263 | /* jshint eqeqeq: true */ |
|
| 5264 | ||
| 5265 | // Don't check non-elements (#13208) |
|
| 5266 | // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) |
|
| 5267 | if ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== "click" ) ) { |
|
| 5268 | matches = []; |
|
| 5269 | for ( i = 0; i < delegateCount; i++ ) { |
|
| 5270 | handleObj = handlers[ i ]; |
|
| 5271 | ||
| 5272 | // Don't conflict with Object.prototype properties (#13203) |
|
| 5273 | sel = handleObj.selector + " "; |
|
| 5274 | ||
| 5275 | if ( matches[ sel ] === undefined ) { |
|
| 5276 | matches[ sel ] = handleObj.needsContext ? |
|
| 5277 | jQuery( sel, this ).index( cur ) > -1 : |
|
| 5278 | jQuery.find( sel, this, null, [ cur ] ).length; |
|
| 5279 | } |
|
| 5280 | if ( matches[ sel ] ) { |
|
| 5281 | matches.push( handleObj ); |
|
| 5282 | } |
|
| 5283 | } |
|
| 5284 | if ( matches.length ) { |
|
| 5285 | handlerQueue.push( { elem: cur, handlers: matches } ); |
|
| 5286 | } |
|
| 5287 | } |
|
| 5288 | } |
|
| 5289 | } |
|
| 5290 | ||
| 5291 | // Add the remaining (directly-bound) handlers |
|
| 5292 | if ( delegateCount < handlers.length ) { |
|
| 5293 | handlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } ); |
|
| 5294 | } |
|
| 5295 | ||
| 5296 | return handlerQueue; |
|
| 5297 | }, |
|
| 5298 | ||
| 5299 | fix: function( event ) { |
|
| 5300 | if ( event[ jQuery.expando ] ) { |
|
| @@ 4752-4801 (lines=50) @@ | ||
| 4749 | return event.result; |
|
| 4750 | }, |
|
| 4751 | ||
| 4752 | handlers: function( event, handlers ) { |
|
| 4753 | var i, matches, sel, handleObj, |
|
| 4754 | handlerQueue = [], |
|
| 4755 | delegateCount = handlers.delegateCount, |
|
| 4756 | cur = event.target; |
|
| 4757 | ||
| 4758 | // Support (at least): Chrome, IE9 |
|
| 4759 | // Find delegate handlers |
|
| 4760 | // Black-hole SVG <use> instance trees (#13180) |
|
| 4761 | // |
|
| 4762 | // Support: Firefox<=42+ |
|
| 4763 | // Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343) |
|
| 4764 | if ( delegateCount && cur.nodeType && |
|
| 4765 | ( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) { |
|
| 4766 | ||
| 4767 | for ( ; cur !== this; cur = cur.parentNode || this ) { |
|
| 4768 | ||
| 4769 | // Don't check non-elements (#13208) |
|
| 4770 | // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) |
|
| 4771 | if ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== "click" ) ) { |
|
| 4772 | matches = []; |
|
| 4773 | for ( i = 0; i < delegateCount; i++ ) { |
|
| 4774 | handleObj = handlers[ i ]; |
|
| 4775 | ||
| 4776 | // Don't conflict with Object.prototype properties (#13203) |
|
| 4777 | sel = handleObj.selector + " "; |
|
| 4778 | ||
| 4779 | if ( matches[ sel ] === undefined ) { |
|
| 4780 | matches[ sel ] = handleObj.needsContext ? |
|
| 4781 | jQuery( sel, this ).index( cur ) > -1 : |
|
| 4782 | jQuery.find( sel, this, null, [ cur ] ).length; |
|
| 4783 | } |
|
| 4784 | if ( matches[ sel ] ) { |
|
| 4785 | matches.push( handleObj ); |
|
| 4786 | } |
|
| 4787 | } |
|
| 4788 | if ( matches.length ) { |
|
| 4789 | handlerQueue.push( { elem: cur, handlers: matches } ); |
|
| 4790 | } |
|
| 4791 | } |
|
| 4792 | } |
|
| 4793 | } |
|
| 4794 | ||
| 4795 | // Add the remaining (directly-bound) handlers |
|
| 4796 | if ( delegateCount < handlers.length ) { |
|
| 4797 | handlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } ); |
|
| 4798 | } |
|
| 4799 | ||
| 4800 | return handlerQueue; |
|
| 4801 | }, |
|
| 4802 | ||
| 4803 | // Includes some event props shared by KeyEvent and MouseEvent |
|
| 4804 | props: ( "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " + |
|
| @@ 4429-4473 (lines=45) @@ | ||
| 4426 | return event.result; |
|
| 4427 | }, |
|
| 4428 | ||
| 4429 | handlers: function( event, handlers ) { |
|
| 4430 | var i, matches, sel, handleObj, |
|
| 4431 | handlerQueue = [], |
|
| 4432 | delegateCount = handlers.delegateCount, |
|
| 4433 | cur = event.target; |
|
| 4434 | ||
| 4435 | // Find delegate handlers |
|
| 4436 | // Black-hole SVG <use> instance trees (#13180) |
|
| 4437 | // Avoid non-left-click bubbling in Firefox (#3861) |
|
| 4438 | if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { |
|
| 4439 | ||
| 4440 | for ( ; cur !== this; cur = cur.parentNode || this ) { |
|
| 4441 | ||
| 4442 | // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) |
|
| 4443 | if ( cur.disabled !== true || event.type !== "click" ) { |
|
| 4444 | matches = []; |
|
| 4445 | for ( i = 0; i < delegateCount; i++ ) { |
|
| 4446 | handleObj = handlers[ i ]; |
|
| 4447 | ||
| 4448 | // Don't conflict with Object.prototype properties (#13203) |
|
| 4449 | sel = handleObj.selector + " "; |
|
| 4450 | ||
| 4451 | if ( matches[ sel ] === undefined ) { |
|
| 4452 | matches[ sel ] = handleObj.needsContext ? |
|
| 4453 | jQuery( sel, this ).index( cur ) >= 0 : |
|
| 4454 | jQuery.find( sel, this, null, [ cur ] ).length; |
|
| 4455 | } |
|
| 4456 | if ( matches[ sel ] ) { |
|
| 4457 | matches.push( handleObj ); |
|
| 4458 | } |
|
| 4459 | } |
|
| 4460 | if ( matches.length ) { |
|
| 4461 | handlerQueue.push({ elem: cur, handlers: matches }); |
|
| 4462 | } |
|
| 4463 | } |
|
| 4464 | } |
|
| 4465 | } |
|
| 4466 | ||
| 4467 | // Add the remaining (directly-bound) handlers |
|
| 4468 | if ( delegateCount < handlers.length ) { |
|
| 4469 | handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); |
|
| 4470 | } |
|
| 4471 | ||
| 4472 | return handlerQueue; |
|
| 4473 | }, |
|
| 4474 | ||
| 4475 | // Includes some event props shared by KeyEvent and MouseEvent |
|
| 4476 | props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), |
|