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

Sheet not closing on mobile #154

Open
Knaackee opened this issue Dec 17, 2023 · 8 comments
Open

Sheet not closing on mobile #154

Knaackee opened this issue Dec 17, 2023 · 8 comments

Comments

@Knaackee
Copy link

At first, thanks for the great work!

I am unable to “swipe to close” the sheet on mobile while using the <Scroller/>.
Without the scroller, it works. It works on the drag indicator but not on the content area.

<Sheet
    isOpen={state.isOpen}
    onClose={() => onClose()}
  >
  <Sheet.Container>
    <Sheet.Header />
    <Sheet.Content>
      <Sheet.Scroller>
        <div className="h-64">Hello</div>
      </Sheet.Scroller>
    </Sheet.Content>
  </Sheet.Container>
  <Sheet.Backdrop
    onTap={() => {
      onClose();
    }}
  />
</Sheet>

Any idea?

@CodeXiD
Copy link

CodeXiD commented Feb 2, 2024

same problem, any news on this issue?

@CodeXiD
Copy link

CodeXiD commented Feb 2, 2024

Hello everyone, I encountered the same problem, in my case I removed the Header, and wanted to make my own, but on mobile I encountered a problem that the panel did not collapse, but only jumped slightly from top to bottom. The solution turned out to be quite simple, I added the draggable={false} attribute to my own Header (which is not located at the top of the hierarchy), and everything began to work as expected

@Knaackee
Copy link
Author

Knaackee commented Feb 2, 2024

same problem, any news on this issue?

Not really. I did a workaround

@CodeXiD
Copy link

CodeXiD commented Feb 2, 2024

same problem, any news on this issue?

Not really. I did a workaround

Share your solution?

@mirandanc
Copy link

Still having the same problem.

@Temzasse
Copy link
Owner

Hi @Knaackee 👋

The Scroller component works so that it enables the drag gestures only when the scroller is either at the top or at the bottom. If the user is scrolling the content the sheet body is not draggable as there is really no way to distinguish between scrolling and dragging.

Is the problem that the sheet is not draggable at the top/bottom positions? That would be a bug.

Does this example demo work for you? At least on my iPhone it works nicely: sheet is dragged down from body area when the sheet is not scrolled and when the sheet scroller is scrolled all the way to bottom the sheet can be dragged upwards.

@gremcha
Copy link

gremcha commented May 17, 2024

Hello @Temzasse

I've also encountered this issue. Your demonstrative example doesn't work on Android mobile devices. I tested it on Chrome and Firefox browsers.

I can also reproduce this problem on a computer in the Chrome browser. Under normal conditions, the modal window behaves correctly, but when I switch to a mobile device, it stops closing.

2024-05-17 13-07-47

@BetBit
Copy link

BetBit commented May 17, 2024

Hello!
This issue is only related to Android; everything works correctly on iOS.

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

6 participants