Skip to content

Commit

Permalink
fix(dropdown): prevent event propogation if dropdown toggle clicked
Browse files Browse the repository at this point in the history
  • Loading branch information
valorkin committed Sep 14, 2017
1 parent 0ec46af commit 04cab1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import { DEMOS } from './demos';
// webpack html imports
let titleDoc = require('html-loader!markdown-loader!./docs/usage.md');

console.log('loaded async');

@Component({
selector: 'accordion-section',
template: `
Expand Down
5 changes: 3 additions & 2 deletions src/dropdown/bs-dropdown-toggle.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ export class BsDropdownToggleDirective implements OnDestroy {
);
}

@HostListener('click')
onClick(): void {
@HostListener('click', ['$event'])
onClick(event: MouseEvent): void {
event.stopPropagation();
if (this.isDisabled) {
return;
}
Expand Down

0 comments on commit 04cab1e

Please sign in to comment.