-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[SwipeableDrawer] Only listen on touchStart events of the swipe area for opening #11362
Conversation
changeTransition: false, | ||
}); | ||
} | ||
setImmediate(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meh… I'll change it to setTimeout
then.
The current deploy preview is here: https://deploy-preview-11362--material-ui-ci.netlify.com |
Seems fine to me (for what this PR intended to do). The only issues I have are that the page behind the drawer scrolls as you swipe. This HN app which was my go-to before the scraper stopped working reliably) seems to have solved it by disabling scrolling while swiping. (It also supports something resembling momentum swipes.) |
@mbrookes Doesn't seem fine to me, though, after some more testing. It flickers now, even with setTimeout/setImmediate. Regarding momentum swipe: That's on my TODO list, but not in the near future. |
Hmm, yeah, now that I look at it again out of the bright 🌞 it does seem a bit juddery. |
Swiping now works like a charm, but toggling |
@leMaik I'm closing for now |
This PR does not only simplify the detection logic of opening swipes but also fixes a bug where you would swipe open (or discover) a drawer even if there are elements on top of it (e.g. Dialogs) because the open swipe used to listen to the
body
's events.It requires re-testing on Safari, I don't have any 🍎 devices at hand.