Skip to content

Commit

Permalink
Merge pull request #12075 from runspired/event-runloop-fix
Browse files Browse the repository at this point in the history
Don't spin up extra run-loops when bubbling events.  Fixes #11540
  • Loading branch information
stefanpenner committed Sep 9, 2015
2 parents eeca01a + 257b271 commit 60ab022
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/ember-views/lib/system/event_dispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ export default EmberObject.extend({
},

_bubbleEvent(view, evt, eventName) {
return run.join(view, view.handleEvent, eventName, evt);
return view.handleEvent(eventName, evt);
},

destroy() {
Expand Down
3 changes: 2 additions & 1 deletion packages/ember-views/lib/views/states/has_element.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import _default from 'ember-views/views/states/default';
import merge from 'ember-metal/merge';
import jQuery from 'ember-views/system/jquery';
import run from 'ember-metal/run_loop';

/**
@module ember
Expand Down Expand Up @@ -61,7 +62,7 @@ merge(hasElement, {
if (view.has(eventName)) {
// Handler should be able to re-dispatch events, so we don't
// preventDefault or stopPropagation.
return view.trigger(eventName, evt);
return run.join(view, view.trigger, eventName, evt);
} else {
return true; // continue event propagation
}
Expand Down

0 comments on commit 60ab022

Please sign in to comment.