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

Loading more items with paginated loading via touch closes menu #43

Open
techniq opened this issue Jul 20, 2018 · 1 comment
Open

Loading more items with paginated loading via touch closes menu #43

techniq opened this issue Jul 20, 2018 · 1 comment

Comments

@techniq
Copy link
Owner

techniq commented Jul 20, 2018

When using touch input on the paginated loading story example, clicking "Load more items" closes the menu but still loads more items.

It's been difficult to get using a Portal with touch input correct...

For clicks, we initially would use onMouseUp={e => e.stopPropagation() on the react-popper instance to work around the issue, but this didn't work for touch.

I found using downshiftProps.getMenuProps(...) worked on Portal when using react-portal, but this broke when we switched to using Material-UI's Popper (which uses a Portal internally). Adding a div within the Popper appears to fix selecting items on touch/mobile except for the case of the "Load more items" case. I tried adding a e.stopPropagation() to the ListItem's onClick in the paginated story, but it would still trigger the outer click.

Need to think some more on this one...

@techniq techniq changed the title Loading more items with paginated loading closes menu Loading more items with paginated loading via touch closes menu Jul 26, 2018
@techniq
Copy link
Owner Author

techniq commented Jul 30, 2018

See #46, but I just tested removing { suppressRefError: true } and added disablePortal to Popper, but the issue still remains.

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

No branches or pull requests

1 participant