Skip to content

Commit

Permalink
fix: check state only from hide (#1004)
Browse files Browse the repository at this point in the history
  • Loading branch information
atomiks committed Nov 9, 2021
1 parent bf303b3 commit cac8a12
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/createTippy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ export default function createTippy(
);
}

function handleStyles(): void {
function handleStyles(fromHide = false): void {
popper.style.pointerEvents =
instance.props.interactive && instance.state.isVisible ? '' : 'none';
instance.props.interactive && !fromHide ? '' : 'none';
popper.style.zIndex = `${instance.props.zIndex}`;
}

Expand Down Expand Up @@ -1051,7 +1051,7 @@ export default function createTippy(

cleanupInteractiveMouseListeners();
removeDocumentPress();
handleStyles();
handleStyles(true);

if (getIsDefaultRenderFn()) {
const {box, content} = getDefaultTemplateChildren();
Expand Down

0 comments on commit cac8a12

Please sign in to comment.