Skip to content

Commit d039a8d

Browse files
gilsdavvalorkin
authored andcommitted
fix(popover): no focus on button on Mac OS #1795 (#2031)
fixes #1795
1 parent 41f11e6 commit d039a8d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/popover/popover.directive.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,16 @@ export class PopoverDirective implements OnInit, OnDestroy {
6767
Object.assign(this, _config);
6868
this.onShown = this._popover.onShown;
6969
this.onHidden = this._popover.onHidden;
70+
71+
// fix: no focus on button on Mac OS #1795
72+
_elementRef.nativeElement.addEventListener('click', function() {
73+
try {
74+
_elementRef.nativeElement.focus();
75+
} catch(err) {
76+
return;
77+
}
78+
});
79+
7080
}
7181

7282
/**

0 commit comments

Comments
 (0)