Open Nielssg opened 1 year ago
I added a "waiting for upvotes" label. Let's wait for upvotes as it's not a small change.
I came up with an interim solution that I am using, which is to add an onMouseDown
event that also calls the handle close event to the handle. It's enough to fool the user into thinking they are dragging.
Here is a forked sandbox with the implementation.
https://codesandbox.io/s/great-hertz-0kmorp?file=/src/App.tsx
So why you don't fix this issue its open from 2022
This seems as intended to me. Emulating a touch swipe with a cursor is unintuitive. It requires the user to mouse down > drag fast > mouse up in the correct direction without too much skew off the axis. I can't think of any single interaction in anything I've used that uses this.
Duplicates
Latest version
Steps to reproduce πΉ
Link to live example: https://codesandbox.io/s/flamboyant-fast-3ynzp2?file=/src/App.tsx
Steps:
Current behavior π―
A drawer will appear which cannot be dismissed by dragging it down, this is only possible for devices which have touch targets (so basically mobile).
Expected behavior π€
When using the SwipeableDrawer, I would expect the drawer to be swipeable whether I am on a touch target device or when I'm using it on a desktop.
Context π¦
I use the SwipeableDrawer to create a Material Bottom Sheet, where I would like to dismiss the sheet by dragging it down, whether I'm using a phone or a desktop. I noticed that users are trying to drag down the sheet (which is expected because we are providing a "handle") but they are unable to do so because they are using it on a desktop.
Your environment π
``` System: OS: Windows 10 10.0.22621 Binaries: Node: 17.5.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.18 - C:\Program Files\nodejs\yarn.CMD npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD Browsers: Chrome: Not Found Edge: Spartan (44.22621.963.0), Chromium (108.0.1462.54) ```npx @mui/envinfo