Skip to content

Animated popups can get stuck open if mouse enters then leaves very quickly #157

Description

@mogzol

Pretty much what the title says. I'm on version 4.0.0-alpha.7. Given an element like this:

<Trigger
  action={["hover"]}
  popup={<span>Hello There</span>}
  popupTransitionName="fade"
  mouseLeaveDelay={0}
  popupAlign={{
    points: ["tc", "bc"],
    offset: [0, 3]
  }}
>
  <p>Test</p>
</Trigger>

And a style like the fade animation from rc-animate's examples. Or even something simple like this:

.rc-trigger-popup {
  display: inline-block;
  opacity: 1;
  transition: opacity 1s;
}

.rc-trigger-popup-hidden {
  display: none;
}

.fade-enter-active {
  opacity: 1 !important;
}

.fade-leave-active {
  opacity: 0;
}

For the most part the trigger/popup works normally. Hovering over the "Test" text creates the popup, which fades in, and then fades out when you stop hovering over the text. The issue comes up when you move your mouse quickly over the text. Sometimes it works normally, other times the popup gets stuck open even after the mouse has left. Increasing the mouseLeaveDelay seems to mitigate the problem, but that's not really a solution.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions