Skip to content

Commit

Permalink
@dmlap switched events to not bubble by default. closes #2351
Browse files Browse the repository at this point in the history
  • Loading branch information
dmlap authored and heff committed Jul 21, 2015
1 parent 1eb416d commit 07f0483
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ CHANGELOG
* @heff sped up testing ([view](https://github.com/videojs/video.js/pull/2254))
* pass fs state to player from enterFullscreen, split full-window styles into their own selector ([view](https://github.com/videojs/video.js/pull/2357))
* Fixed vertical option for volumeMenuButton ([view](https://github.com/videojs/video.js/pull/2352))
* @dmlap switched events to not bubble by default ([view](https://github.com/videojs/video.js/pull/2351))

--------------------

Expand Down
6 changes: 3 additions & 3 deletions src/js/utils/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 07f0483

Please sign in to comment.