parent
67a47f85c7
commit
dd7a2a6bbf
1 changed files with 3 additions and 3 deletions
|
@ -16,8 +16,8 @@ const enterDelay = 750;
|
||||||
const leaveDelay = 150;
|
const leaveDelay = 150;
|
||||||
const popperConfig = { strategy: 'fixed' } as UsePopperOptions;
|
const popperConfig = { strategy: 'fixed' } as UsePopperOptions;
|
||||||
|
|
||||||
const isHoverCardAnchor = (/*element: HTMLElement*/) => false; // set false until original is fixed some problem about this hover
|
const isHoverCardAnchor = (element: HTMLElement) =>
|
||||||
// element.matches('[data-hover-card-account]');
|
element.matches('[data-hover-card-account]');
|
||||||
|
|
||||||
export const HoverCardController: React.FC = () => {
|
export const HoverCardController: React.FC = () => {
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
|
@ -70,7 +70,7 @@ export const HoverCardController: React.FC = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// We've entered an anchor
|
// We've entered an anchor
|
||||||
if (!isScrolling && isHoverCardAnchor(/*target*/)) {
|
if (!isScrolling && isHoverCardAnchor(target)) {
|
||||||
cancelLeaveTimeout();
|
cancelLeaveTimeout();
|
||||||
|
|
||||||
currentAnchor?.removeAttribute('aria-describedby');
|
currentAnchor?.removeAttribute('aria-describedby');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue