Fluentui: HoverCard - Card still dismisses on mouse out when 'sticky' prop set to true

Created on 30 Jan 2019  路  3Comments  路  Source: microsoft/fluentui

Environment Information

  • __Package version(s)__: Whatever comes with SPFX 1.7.0
  • __Browser and OS versions__: Chrome & Windows 10

CodePen: https://codepen.io/anon/pen/WPoXzo

Actual behavior:

HoverCard dismisses as usual

Expected behavior:

HoverCard remains open

Requested priority: Normal

HoverCard Type

Most helpful comment

One approach could be to only not dismiss the card when the onLeave callback fires if the event is a mouseleave MouseEvent event. Will be opening a PR shortly with this fix. If this fix breaks something else or is invalid for some other reason, please let me know!

All 3 comments

After some debugging, it appears that it's actually the card is closing because of the mouse leave event from the ExpandingCard or PlainCard rendered by the HoverCard.

I'm not sure expectation here. If the card is marked as sticky, when does it dismiss?

We can create a wrapper function to handle the onLeave callback passed to the card and only execute a dismiss if the sticky prop is false, but then the card will never dismiss.

I think the fix is likely relatively simple once the expected behavior is determined.

One approach could be to only not dismiss the card when the onLeave callback fires if the event is a mouseleave MouseEvent event. Will be opening a PR shortly with this fix. If this fix breaks something else or is invalid for some other reason, please let me know!

:tada:This issue was addressed in #7898, which has now been successfully released as [email protected].:tada:

Handy links:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

luisrudge picture luisrudge  路  3Comments

luisrudge picture luisrudge  路  3Comments

nekoya picture nekoya  路  3Comments

holysnake91 picture holysnake91  路  3Comments

mattcoxonline picture mattcoxonline  路  3Comments