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:
parent
b3759e966d
commit
95734cf7cc
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user