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

slider and leftSide Nav Menu on dragging event #1384

Closed
mercuriete opened this issue Aug 11, 2015 · 5 comments · Fixed by #2263
Closed

slider and leftSide Nav Menu on dragging event #1384

mercuriete opened this issue Aug 11, 2015 · 5 comments · Fixed by #2263
Labels
component: slider This is the name of the generic UI component, not the React module!

Comments

@mercuriete
Copy link

When you are dragging a slider on a mobile phone, the left side navigation menu is opened at the sime time that you drag the slider.

it is annoing because you cant use sliders at all in your page.

reproduce:

  1. go to this page in chrome with a mobile device.
    http://material-ui.com/#/components/sliders

  2. try to drag the slider

  3. the left navigation menu is opened at the same time so the focus is on both element.

thanks for this awsome product.

@nicholas-l
Copy link
Contributor

I can confirm, the LeftNav opens at the same time as the sliders. Is there anyway to ignore the LeftNav slide open part if it is not from the far left? i.e. only slide open the LeftNav if the slide originates from the far left side.

@violinchris
Copy link

I was just dealing with this issue. At Around line 252 in left-nav.jsx. I think this works for me, but I haven't thought about what is the best way.

_onBodyTouchStart: function _onBodyTouchStart(e) {
if (e.touches[0].pageX > 10) return;

@shaurya947
Copy link
Contributor

I can confirm this. @oliviertassinari what do you think about the change suggested by @violinchris above?

@alitaheri
Copy link
Member

if (e.touches[0].pageX > 10) return;

Hmmm this might also solve the swipeable Tabs issue. thoughts @oliviertassinari ?

@oliviertassinari
Copy link
Member

_onBodyTouchStart: function _onBodyTouchStart(e) {
    if (e.touches[0].pageX > 10) return;

I don't know if 10 is enough, but yes, the idea is here 👍.
Just don't forget to check that the slider is closed

@oliviertassinari oliviertassinari added component: accordion This is the name of the generic UI component, not the React module! component: slider This is the name of the generic UI component, not the React module! and removed component: accordion This is the name of the generic UI component, not the React module! labels Aug 22, 2020
mnajdova pushed a commit to mnajdova/material-ui that referenced this issue Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: slider This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants