touchstart, then there’s touchmove, and then iOS does the same thing, and only after the user has moved their finger these 5 pixels the touchmove is going to start being a scroll. If it’s not a scroll yet you can call preventDefault() on it and iOS will stop taking that touch event and making it into a scroll event. After it is already a scroll event, it’s a scroll interaction, and there’s an intervention that you can’t end scroll interactions, it’s completely blocked. I don’t think there’s a standard for that either, it’s just it doesn’t want you to block an ongoing scroll because it’s going to look very laggy and glitchy. On Chrome you can’t do that and you have to stop the touchstart event. If you call preventDefault() on touchstart it’s not going to become a scroll interaction, you can prevent scroll entirely, but then you don’t know in which direction the user is scrolling. So you can say on this event I don’t want the user to be able to scroll at all, but you can’t say after it has moved a bit, that it can’t be a scroll. Finding these things out is very difficult and very time intensive. I’ve done a lot of demos and codepens experimenting with browsers. It’s very frustrating because there’s not really standards for it, or documentation and stuff. It got to the point where I started looking through the source code of the Chromium project.
You looked through browser source code?
I tried to look at it, but I didn't get far enough. I just experimented a lot. The person who implemented it is probably going to be able to correct me, and there’s probably going to be some things different, because it’s only from observation what I just described. It was just very difficult to get these things working, like really, really, really difficult. We did a lot of iteration, a lot of testing, over time. I kind of got really obsessed with making scrolling really nice on mobile and trying to make native-like applications on the web that don’t feel like they’re just a glitchy web page.
For that specific Chrome issue, did you by any chance file a bug?
No, I haven’t done that. I’ve started filing bugs lately for things that I come across. […] It’s difficult to know what the right behavior is, I don’t feel confident enough to be able to file an issue saying “this is what’s wrong, this is the clear bug.” I guess it's probably already helpful to know that it’s a pain point.
Made with FlippingBook - professional solution for displaying marketing and sales documents online