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

[Tabs] Unable to open a Popover using Tab's onActive handler on mobile browser #4376

Closed
dheerajvs opened this issue May 29, 2016 · 1 comment
Labels
bug 🐛 Something doesn't work component: tabs This is the name of the generic UI component, not the React module!

Comments

@dheerajvs
Copy link

Problem description

Unable to open a Popover using onActive handler on a Tab on mobile browsers. The popover automatically disappears after being momentarily shown.

Steps to reproduce

Important: You must use "device mode" in Chrome developer tools, or use Chrome on Android device to reproduce this issue. It is NOT reproducible on desktop.

  1. Have a Tab with onActive callback.
  2. Let the callback set the open state of a Popover

Note: react-tap-event-plugin is injected. Not sure if that matters in this case.

Possible Fix

I'm able to fix this issue by calling event.preventDefault(); just before invoking tab.props.onActive(tab); in this line in Tabs.js.

Another possibility is If the event object is passed to the onActive callback, the application code can call preventDefault() itself if needed.

Versions

  • Material-UI: 0.15.0
  • React: 15.0.2
  • Browser: Chrome 50 on Android 6.0.1, Google Chrome 50 on Mac OS X (Device Mode only)
@muibot muibot added the Triage label May 29, 2016
@mpontikes mpontikes mentioned this issue Aug 5, 2016
13 tasks
@oliviertassinari oliviertassinari added component: tabs This is the name of the generic UI component, not the React module! and removed component: tabs This is the name of the generic UI component, not the React module! labels Oct 19, 2016
@oliviertassinari
Copy link
Member

The popover automatically disappears after being momentarily shown.

I have already seen this issue, I think that it's linked to some events being triggered on the new element being displayed. Adding a delay should solve the issue.

@oliviertassinari oliviertassinari added the bug 🐛 Something doesn't work label May 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: tabs This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

4 participants