Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.1.1 is broken while we use HoverPopover #134

Closed
tianyingchun opened this issue May 19, 2024 · 5 comments
Closed

5.1.1 is broken while we use HoverPopover #134

tianyingchun opened this issue May 19, 2024 · 5 comments
Labels

Comments

@tianyingchun
Copy link

tianyingchun commented May 19, 2024

 <button
        type="button"
        className={cn(
          'flex w-full items-center font-semibold',
          pathname.startsWith('/developers') || popupState.isOpen
            ? 'text-[#357d8a]'
            : ''
        )}
        onClick={(e) => {
          e.stopPropagation();
          e.preventDefault();
        }}
        {...bindHover(popupState)}
      >
        Developers
        <IconArrowDown active={popupState.isOpen} />
      </button>
      <HoverPopover
        {...bindMenu(popupState)}
        anchorEl={popupState.anchorEl}
        anchorOrigin={{ vertical: 'bottom', horizontal: 'left' }}
        transformOrigin={{ vertical: 'top', horizontal: 'left' }}
        classes={{
          paper:
            '!rounded-lg bg-white sm:border sm:shadow-md dark:border-slate-700 dark:!bg-slate-900 sm:dark:border',
        }}
      >

5.1.0 is works fine, after upgrade to 5.1.1, the hover menu the popover show, while we try to move to popover menu it disappeared

https://jcoreio.github.io/material-ui-popup-state/#hover-popover

@jedwards1211
Copy link
Member

@tianyingchun thanks for the report, can you show me a video of what's happening? I can't tell exactly what you mean

@tianyingchun
Copy link
Author

@tianyingchun
Copy link
Author

Please see the example above hover popover ,The mouse cannot be moved to the pop-up div

@jedwards1211
Copy link
Member

🎉 This issue has been resolved in version 5.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jedwards1211
Copy link
Member

Okay now I understand! This was due to a bug I discovered in @mui/material: mui/material-ui#42310

However I was able to make hover popovers work in material-ui-popup-state, as long as you don't pass a function for slotProps.paper to HoverPopover.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants