From d039a8d26cbd30e63526fe113aec1543ec0734fa Mon Sep 17 00:00:00 2001 From: David Gilson Date: Fri, 14 Jul 2017 14:32:26 +0200 Subject: [PATCH] fix(popover): no focus on button on Mac OS #1795 (#2031) fixes #1795 --- src/popover/popover.directive.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/popover/popover.directive.ts b/src/popover/popover.directive.ts index d3b9612fe7..52e3c9c5dc 100644 --- a/src/popover/popover.directive.ts +++ b/src/popover/popover.directive.ts @@ -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; + } + }); + } /**