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

Cannot make div scrollable (mobile?) #134

Closed
piciuok opened this issue Mar 31, 2020 · 10 comments
Closed

Cannot make div scrollable (mobile?) #134

piciuok opened this issue Mar 31, 2020 · 10 comments

Comments

@piciuok
Copy link

piciuok commented Mar 31, 2020

Hey!

I'm supprised that i cannot scroll my div. I looked deeper and i found, that method removeMoveHandler in DrawerChild prevent me from scrolling. Have you any idea how to solve that?

If i return; in that method immediately, all works fine.

steps:

  1. create div in drawer
  2. add to div overflow:auto and max-width: 100%
  3. create inside div another div, give him min-width: 1000px and some fake content
  4. switch to mobile view, set 400px viewport
  5. try to scroll by swipe that div

I use that for scrolling tables in articles, that have many columns and not fit to small screen

@sowka1995
Copy link

I have the same issue. If you set mask property to false than your drawer content will be scrollable but its not a solution, because we normally want to have a mask overlay - mainly on desktop

@anhtran
Copy link

anhtran commented May 27, 2020

I have to modify code to force passive: true in https://github.com/react-component/drawer/blob/master/src/DrawerChild.tsx#L313 to make the app works. Hope this issue will be resolved soon.

@jljsj33
Copy link
Member

jljsj33 commented Jun 4, 2020

Android??? What browser???/

@anhtran
Copy link

anhtran commented Jun 4, 2020

@jljsj33 Chrome on iOS and Android.

@jljsj33
Copy link
Member

jljsj33 commented Jun 4, 2020

iOS chrome no problem.

Kapture 2020-06-04 at 19 24 02

@jljsj33
Copy link
Member

jljsj33 commented Jun 4, 2020

need reproduce

@anhtran
Copy link

anhtran commented Jun 4, 2020

@jljsj33 sorry, it's about horizontal scroll.

@jljsj33
Copy link
Member

jljsj33 commented Jun 4, 2020

Problem found, https://github.com/react-component/drawer/blob/master/src/utils.ts#L107-L108

@jljsj33 jljsj33 closed this as completed in f9e9c35 Jun 4, 2020
@jljsj33
Copy link
Member

jljsj33 commented Jun 4, 2020

fix in v4.0.1

@luigi-veo
Copy link

luigi-veo commented Apr 20, 2021

fix in v4.0.1

It is still not working for me, neither on chrome, safari or firefox. The scroll is locked.
I'm using version 4.3.1

It works fine with placement="left" or "right"
It does not work with "top" or "bottom"

<Drawer
      open={isOpen}
      onClose={closeDrawer}
      level={null}
      placement="top"
      handler={false}
      wrapperClassName="instant-search__drawer"
   >{ children }</Drawer>

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

5 participants