-
Notifications
You must be signed in to change notification settings - Fork 28
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
HoverPopover does not close with fast mouse movements #67
Comments
@Stromij sorry for the trouble. I think the reason this is happening is you're reusing the same For background on why this happens:
So function getPopup({ popupId }: PopupState): ?HTMLElement {
return popupId && typeof document !== 'undefined'
? document.getElementById(popupId) // eslint-disable-line no-undef
: null
}
function isElementInPopup(
element: HTMLElement,
popupState: PopupState
): boolean {
const { anchorEl, _childPopupState } = popupState
return (
isAncestor(anchorEl, element) ||
isAncestor(getPopup(popupState), element) ||
(_childPopupState != null && isElementInPopup(element, _childPopupState))
)
} |
I'm testing with unique |
Okay, yes, using unique Given some of the issues I've been having with touch devices, I may end up making |
I'm going to close this, but we can revisit it if using unique |
@jedwards1211 Thank you very much, somehow I did not saw that. Now I use unique |
Hello everyone,
I'm trying to use the HoverPopover on several components. To do so I used the Popover-Example from the docs and adapted it to render more than one button:
Everything works fine, except with fast mouse movements. The showing popover does not disappear anymore. To get an idea of what I mean I add a small video:
This is a problem because the Popover itself blocks any scroll events as mentioned in another issue (#37). This way, the page is not scrollable until the user closes the Popover by revisiting the corresponding element with the mouse.
I found the following as a workaround in this particular case
but since this is just a toy-example and I need to use this in a table on each table cell, I cannot wrap every table cell in a div (or something similar) without effecting the layout.
The text was updated successfully, but these errors were encountered: