package.src.js.select2.dropdown.stopPropagation.js Maven / Gradle / Ivy
define([
], function () {
function StopPropagation () { }
StopPropagation.prototype.bind = function (decorated, container, $container) {
decorated.call(this, container, $container);
var stoppedEvents = [
'blur',
'change',
'click',
'dblclick',
'focus',
'focusin',
'focusout',
'input',
'keydown',
'keyup',
'keypress',
'mousedown',
'mouseenter',
'mouseleave',
'mousemove',
'mouseover',
'mouseup',
'search',
'touchend',
'touchstart'
];
this.$dropdown.on(stoppedEvents.join(' '), function (evt) {
evt.stopPropagation();
});
};
return StopPropagation;
});