Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ab9342d

Browse files
committedMay 17, 2018
Return false from handleEvent in linkTo if bubbles is false
1 parent ff5cf32 commit ab9342d

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed
 

‎packages/ember-glimmer/lib/components/link-to.ts

+12-3
Original file line numberDiff line numberDiff line change
@@ -296,13 +296,14 @@
296296
@public
297297
*/
298298

299+
import EmberComponent, { HAS_BLOCK } from '../component';
299300
import { assert, warn } from '@ember/debug';
301+
import { computed, get } from 'ember-metal';
302+
303+
import { DEBUG } from '@glimmer/env';
300304
import { flaggedInstrument } from '@ember/instrumentation';
301305
import { inject as injectService } from '@ember/service';
302-
import { DEBUG } from '@glimmer/env';
303-
import { computed, get } from 'ember-metal';
304306
import { isSimpleClick } from 'ember-views';
305-
import EmberComponent, { HAS_BLOCK } from '../component';
306307
import layout from '../templates/link-to';
307308

308309
/**
@@ -897,6 +898,14 @@ const LinkComponent = EmberComponent.extend({
897898
this.set('models', []);
898899
}
899900
},
901+
902+
handleEvent() {
903+
let propagate = this._super(...arguments);
904+
if (this.bubbles === false) {
905+
return this.bubbles;
906+
}
907+
return propagate;
908+
},
900909
});
901910

902911
LinkComponent.toString = () => '@ember/routing/link-component';

0 commit comments

Comments
 (0)
Please sign in to comment.