diff --git a/src/components/HelpIconPopover/index.jsx b/src/components/HelpIconPopover/index.jsx
index 0f9d7a17b..416e45c05 100644
--- a/src/components/HelpIconPopover/index.jsx
+++ b/src/components/HelpIconPopover/index.jsx
@@ -6,8 +6,8 @@ import './styles.css';
const HelpIconPopover = ({ children, id, placement }) => (
{children && children.length > 0 ? (
{children}}
- popperRef={setPopperNode}
>
{element}
diff --git a/src/components/HoverDropdownMenu/index.spec.jsx b/src/components/HoverDropdownMenu/index.spec.jsx
index ec882f4c6..5a5fd9783 100644
--- a/src/components/HoverDropdownMenu/index.spec.jsx
+++ b/src/components/HoverDropdownMenu/index.spec.jsx
@@ -62,7 +62,7 @@ describe('
', () => {
);
act(() => {
- fireEvent.mouseEnter(getByTestId('hover-dropdown-element'));
+ fireEvent.pointerOver(getByTestId('hover-dropdown-element'));
jest.runAllTimers();
});
@@ -83,19 +83,19 @@ describe('
', () => {
);
act(() => {
- fireEvent.mouseEnter(getByTestId('hover-dropdown-element'));
+ fireEvent.pointerOver(getByTestId('hover-dropdown-element'));
jest.runAllTimers();
});
expect(queryByTestId('popover-wrapper')).toBeInTheDocument();
act(() => {
- fireEvent.mouseLeave(getByTestId('hover-dropdown-element'));
+ fireEvent.pointerLeave(getByTestId('popover-wrapper'));
jest.runAllTimers();
});
expect(queryByTestId('popover-wrapper')).not.toBeInTheDocument();
act(() => {
- fireEvent.mouseEnter(getByTestId('hover-dropdown-element'));
+ fireEvent.pointerOver(getByTestId('hover-dropdown-element'));
jest.runAllTimers();
});
expect(queryByTestId('popover-wrapper')).toBeInTheDocument();
@@ -111,34 +111,27 @@ describe('
', () => {
);
act(() => {
- fireEvent.mouseEnter(getByTestId('hover-dropdown-element'));
+ fireEvent.pointerOver(getByTestId('hover-dropdown-element'));
jest.runAllTimers();
});
expect(queryByTestId('popover-wrapper')).toBeInTheDocument();
act(() => {
- fireEvent.mouseLeave(getByTestId('hover-dropdown-element'));
- fireEvent.mouseEnter(getByTestId('popover-wrapper'));
- jest.advanceTimersByTime(50);
- });
- expect(queryByTestId('popover-wrapper')).toBeInTheDocument();
-
- act(() => {
- fireEvent.mouseLeave(getByTestId('popover-wrapper'));
- fireEvent.mouseEnter(getByTestId('popover-title'));
- jest.advanceTimersByTime(50);
+ fireEvent.pointerLeave(getByTestId('hover-dropdown-element'));
+ fireEvent.pointerOver(getByTestId('popover-wrapper'));
+ jest.runAllTimers();
});
expect(queryByTestId('popover-wrapper')).toBeInTheDocument();
act(() => {
- fireEvent.mouseLeave(getByTestId('popover-title'));
- fireEvent.mouseEnter(queryAllByTestId('popover-link-item-wrapper')[0]);
+ fireEvent.pointerLeave(getByTestId('popover-title'));
+ fireEvent.pointerOver(queryAllByTestId('popover-link-item-wrapper')[0]);
jest.advanceTimersByTime(49);
});
expect(queryByTestId('popover-wrapper')).toBeInTheDocument();
act(() => {
- fireEvent.mouseLeave(getByTestId('popover-wrapper'));
+ fireEvent.pointerLeave(getByTestId('popover-wrapper'));
jest.runAllTimers();
});
diff --git a/src/components/Popover/Popper.d.ts b/src/components/Popover/Popper.d.ts
index 1e0a77adb..ed3f6e51a 100644
--- a/src/components/Popover/Popper.d.ts
+++ b/src/components/Popover/Popper.d.ts
@@ -31,10 +31,10 @@ export interface PopperProps
extends PopperModifiers {
popoverClass?: string;
popoverContent: PopperPopoverContent;
refElement?: Element;
- boundariesElement?: Element;
title?: string;
wrapperStyles?: Object;
popperRef?: (...args: any[]) => any;
+ hasHoverRegion?: boolean;
}
declare const Popper: (props: PopperProps) => React.ReactElement | null;
diff --git a/src/components/Popover/Popper.jsx b/src/components/Popover/Popper.jsx
index 5d413bba3..437d284fa 100644
--- a/src/components/Popover/Popper.jsx
+++ b/src/components/Popover/Popper.jsx
@@ -55,6 +55,7 @@ const Popper = ({
refElement,
modifiers = [],
popperRef,
+ hasHoverRegion,
}) => {
const [popperElement, setPopperElement] = React.useState(null);
const [arrowElement, setArrowElement] = React.useState(null);
@@ -108,6 +109,12 @@ const Popper = ({
{_.isFunction(popoverContent) ? popoverContent({ update }) : popoverContent}
+ {hasHoverRegion && (
+