mirror of https://github.com/zulip/zulip.git
ac7031de3a
Based on extensive manual testing with print-debugg (the exact situation here was highly reproducible), in the absence of this line here or slightly above here, Chrome 64 will consistently trigger an extra scroll-forward-by-12000-pixels size downward scrolling event immediately after it finishes rendering the 5th batch of ~100 messages one gets from hitting the End key in `near:1` narrows. I don't understand clearly why this change would protect against such a Chrome bug, but my best guess is that Chrome was doing some sort of incorrect optimization, and querying the scrollTop was forcing it to come to a clear conclusion about the scrolling position before appending more content. But runs with the scrollTop() line not present in that function show a scrollTop of around 25K in `append()` just before the call to `render()`, and 37K at the end; while runs with this scrollTop line always show 25K both before and after, so it does seem to work. |
||
---|---|---|
.. | ||
assets | ||
audio | ||
generated | ||
html | ||
icons/fonts | ||
images | ||
js | ||
locale | ||
styles | ||
swagger | ||
templates | ||
third | ||
ts | ||
.gitignore | ||
favicon.ico | ||
node_modules |