Repository navigation
Fix scrolling issues - #4484
Fix scrolling issues#4484vadimka123 wants to merge 2 commits into
Conversation
|
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 4e10d6c:
|
|
Greetings @vadimka123 , Do you know or can you test if this makes the the touch Handlers obsolete? My understanding is that the mouseDown and mouseUp are fired after the touch events so perhaps we can replace the touch handlers with these instead of simply adding two more event listeners that do the same thing. |
|
Hi, @ebonow I tested only in desktop this behaviour |
|
No worries, I think I answered my own question anyway as I confused touchmove with touchend. I'll do a quick smoke test and verify that it works and resolves both of the issues that are mentioned. |
|
@vadimka123 I had an opportunity to test this. My concern is that this seems like a partial solution. It is only called when the mouse button is let go so if the user drags to the bottom, doesn't see what they want, drags back up, and then lets go of the mouse button, the onScrollToBottom handler is never called. It's also unclear to me how this resolves #2862 as this doesn't appear to address the scrollTarget ref being null when first called. I appreciate the contribution and simply want to make sure we are adding code that resolves the core issues instead of continuing to patch this up with work arounds. I think long term there are some other solutions we can look at, but I'm not sure that adding 2 more event listeners does that, though it also likely doesn't hurt either. |
I do know why. It is related to how iOS used to only call the onScroll event when the scrolling has stopped which was further complicated by the built in inertia. I believe this has since been addressed in iOS8 or later, and put together this codesandbox to test if it can be worked back in. I tested this against an iPhone simulator as well as someone else tested against an iPhone and it looks like scrolling is being updated in real-time now so I think that would be the better way to go. Not sure if you would be open to having a stab at this, though it may be worth waiting until after TypeScript refactoring is completed. |
|
Greetings @vadimka123 , We appreciate you putting this together but I think we would like to put together a more complete scrolling solution that would likely overwrite the already existing and this proposed code so we will be closing this. I will be sure to include you on any new developments. Thank you again for putting this together and let us know if you would be instead in putting together a PR that uses the onScroll event handler. |
#3232