From c8d5dcf7b942a26267bc774e134f809d2b1f3bd8 Mon Sep 17 00:00:00 2001 From: David LaPalomento Date: Tue, 21 Jul 2015 12:25:01 -0400 Subject: [PATCH] Don't bubble events by default All events will not bubble unless event.bubbles is strictly true. --- src/js/utils/events.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/utils/events.js b/src/js/utils/events.js index 3b24c988ca..c210444bab 100644 --- a/src/js/utils/events.js +++ b/src/js/utils/events.js @@ -17,7 +17,7 @@ import document from 'global/document'; * It stores the handler function in a separate cache object * and adds a generic handler to the element's event, * along with a unique id (guid) to the element. - * + * * @param {Element|Object} elem Element or object to bind listeners to * @param {String|Array} type Type of event to bind to. * @param {Function} fn Event listener. @@ -161,7 +161,7 @@ export function trigger(elem, event, hash) { // Unless explicitly stopped or the event does not bubble (e.g. media events) // recursively calls this function to bubble the event up the DOM. - if (parent && !event.isPropagationStopped() && event.bubbles !== false) { + if (parent && !event.isPropagationStopped() && event.bubbles === true) { trigger.call(null, parent, event, hash); // If at the top of the DOM, triggers the default action unless disabled. @@ -208,7 +208,7 @@ export function one(elem, type, fn) { /** * Fix a native event to have standard property values - * + * * @param {Object} event Event object to fix * @return {Object} * @private