Open sikrob opened 6 years ago
Can confirm that using trigger="focus"
broke my popover in Firefox 57.0.4 (64-bit Mac) and 62.0.3 (64-bit Mac). The only way I found to get focus on the button was by using the tab key. In Chrome ( 69.0.3497.100), I could still click to activate the popover.
Removing trigger="focus"
seems to default to trigger="hover"
behavior on both browsers
I am experiencing this issue as well. Weirdly, clicking tab key does trigger the popover component.
Having the same issue with Chrome Version 80.0.3987.132 (Official Build) (64-bit). Click and Hover work, but when set to trigger="focus" is does not trigger the popover.
This was working fine a few weeks back, but all of a sudden they no longer trigger.
Has anyone found aa solution yet?
I tested this as well.
This looks like a Firefox and Safari issue where onFocus event doesn't get fired for buttons. You can test it here - https://jsfiddle.net/Lqype8sg/1/ (works in Chrome but not in FF or Safari). I fixed it by adding an onClick
event which manually focuses the element,
<OverlayTrigger trigger={["focus"]} overlay={...}>
<Button onClick={(e) => {e.target.focus()}}>
title
</Button>
</OverlayTrigger>
Issue found against Firefox version 61.0 (64-bit), plus a couple versions previous.
You can reproduce this issue by testing against the examples page for popovers: https://react-bootstrap.github.io/components/popovers/
"click" and "hover" seem to work fine, only "focus" is failing to trigger popovers.