Skip to content

Commit

Permalink
Merge pull request #161 from canjs/159-dom-events
Browse files Browse the repository at this point in the history
Add support for the custom event delegation added to can-util
  • Loading branch information
chasenlehara authored Dec 27, 2017
2 parents 181bbc2 + 32c389f commit 5a11b16
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions can-jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ var getMutationObserver = require("can-globals/mutation-observer/mutation-observ
var CIDMap = require("can-util/js/cid-map/cid-map");
var assign = require("can-util/js/assign/assign");

var addEventJQuery = require('can-dom-events/helpers/add-event-jquery');
var domEnter = require('can-event-dom-enter');
var addEnterEvent = require('can-event-dom-enter/compat');
addEnterEvent(domEvents);


module.exports = ns.$ = $;

Expand All @@ -26,8 +27,6 @@ var slice = Array.prototype.slice;
var removedEventHandlerMap = new CIDMap();

if ($) {
addEventJQuery($, domEnter);

// Override dispatch to use $.trigger.
// This is needed so that extra arguments can be used
// when using domEvents.dispatch/domEvents.trigger.
Expand Down Expand Up @@ -138,6 +137,7 @@ if ($) {
var delegateEventType = function delegateEventType(type) {
var typeMap = {
focus: 'focusin',
enter: 'keyup',
blur: 'focusout'
};
return typeMap[type] || type;
Expand Down

0 comments on commit 5a11b16

Please sign in to comment.