-
Notifications
You must be signed in to change notification settings - Fork 24
Fix Webkit scroll issue #138
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
Conversation
|
@JayPanoz Which webkit-based platforms were you trying this out on? OSX, iPhone, iPad, or all? |
|
All. Basically had Safari locally on MacOS, iPadOS and iOS on BrowserStack. My gut feeling tells me it applies to all browsers using WebKit though, due to the fact it smells like a race condition during rendering. I have not checked the source code of WebKit because I have no clue where to start as I can't fully explain this bug but it's nasty. |
|
@JayPanoz OK, I'll try a few things just to make sure I can't find anything. Were you using thorium web or the vanilla reader in this repo? I'll probably try using the vanilla reader |
|
Thorium Web, I guess it is a good idea to test the vanilla reader to scope down the issue. It should be ready-to-reproduce on scroll-ui.thorium-web.pages.dev Just to make sure, the pattern to reproduce is:
While scroll does not register, the scrolling element has no issue scrolling through Any reflow will make the bug disappear e.g. resizing the window. This means the app shell can accidentally resolve the issue on re-render, etc. |
|
@JayPanoz I haven't found the culprit yet, and I don't want to hold up your progress longer. As you mentioned, debugging it is very tedious. iOS 26 doesn't make a difference. |
|
@chocolatkey No worries, I was focusing on readium/css#190 since I have a gut feeling they may be related in some way (rendering path on scroll) and one issue could help explain the other. I tried removing components to make sure they were not interacting so there was literally the container left in the app, tried removing CSS that could be problematic from various SO threads in the app, then in Readium CSS, etc. But I have zero clue at the moment. This is the fundamental problem with both issues: I can’t really tell why they happen, and it’s nearly impossible to create a minimal reproductible test case because of that. |
|
I will merge this fix as it’s blocking for Thorium Web v.1 but will continue debugging in order to find a nicer alternative in the upcoming weeks, and report the issue in Webkit tracker. Hopefully it should be trivial reverting if we can implement something else, or resolve the issue at its root so that it does not happen in the first place. |
Resolves #136
I am really open to any alternative idea but it is pretty much the only working resolution I could achieve due to getting around Webkit’s lifecycle issues e.g. it won’t even work if it is not called at the end of
go_progressionwhen it’s used, and it works only partially in the sense Webkit doesn’t graphically render the overflowing content – with a reference of the viewport to renderprogressionis0, hence why the triggering of the scroll event.Really tried to make it happen before
showas well, but there is pretty much nothing you can rely upon if you want to use a resize or mutation observer…It is worth noting I cannot fully explain what the bug is, based on the fact it is pretty much impossible to debug, a recalc/reflow resolving the non-scrollable issue.
@chocolatkey Maybe another pair of eyes can spot something I did not consider in the last 2 days. Please let me know if you need clarifications as this bug and its resolution are pretty convoluted.