Allow setup event listeners to be set up as separate event listeners
rather than in-conjunction with defaultListener This allows the setup listeners to do things like preventDefault()/stopImmediatePropagation() and have them work
This commit is contained in:
		| @ -472,13 +472,21 @@ | ||||
|  | ||||
|     // Bind along with custom handler | ||||
|     function _proxyListener(element, eventName, userListener, defaultListener, useCapture) { | ||||
|         if(userListener) { | ||||
|             // Register this before defaultListener | ||||
|             _on( | ||||
|                 element, | ||||
|                 eventName, | ||||
|                 function(event) { | ||||
|                     userListener.apply(element, [event]); | ||||
|                 }, | ||||
|                 useCapture | ||||
|             ); | ||||
|         } | ||||
|         _on( | ||||
|             element, | ||||
|             eventName, | ||||
|             function(event) { | ||||
|                 if (userListener) { | ||||
|                     userListener.apply(element, [event]); | ||||
|                 } | ||||
|                 defaultListener.apply(element, [event]); | ||||
|             }, | ||||
|             useCapture | ||||
|  | ||||
		Reference in New Issue
	
	Block a user