Skip to content

Commit

Permalink
fix(popover): no focus on button on Mac OS #1795 (#2031)
Browse files Browse the repository at this point in the history
fixes #1795
  • Loading branch information
gilsdav authored and valorkin committed Jul 14, 2017
1 parent 41f11e6 commit d039a8d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/popover/popover.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@ export class PopoverDirective implements OnInit, OnDestroy {
Object.assign(this, _config);
this.onShown = this._popover.onShown;
this.onHidden = this._popover.onHidden;

// fix: no focus on button on Mac OS #1795
_elementRef.nativeElement.addEventListener('click', function() {
try {
_elementRef.nativeElement.focus();
} catch(err) {
return;
}
});

}

/**
Expand Down

0 comments on commit d039a8d

Please sign in to comment.