Volafile / volafile-bugs

Volafile.org public bug tracker
17 stars 2 forks source link

Great scroll (bottom) bug of 2017 #196

Closed RealDolos closed 7 years ago

RealDolos commented 7 years ago

Sometimes the chat will not "stick" to the bottom when it should (when it was scrolled down before and a new message gets posted).

It does not always happen, but once it happens once, it will happen a lot after that, until you reload the entire tab. Manually scrolling to the bottom, either via a regular scroll or clicking the blinking-arrow icon, will not resolve the issue in a permanent manner; it might go away for a few new messages just to reappear, or immediately reappear.

When this happens, the following code (deminified because MS/Volafile(tm) is not free and open software!) somehow misbehaves, getting feed erronous values

t.prototype.onScrolling = function(t) {
  Date.now() - this.lastResize < 1e3 || (this.scrolledDown = t.data.bottom < this.bottomTolerance)
}

When the bug happens, data.bottom will exceed the tolerance. I observed values (in the debugger) of sometimes 48 sometimes even 120 (when scrollDown was previously true). The scrolling code is an enigma wrapped in setTimeouts and custom event dispatches, so I will stop here for now :tired_face:

Either data.bottom is calculated wrong (or at the wrong time) or it's an async scroll issue.

Affected are at least: Latest Desktop Chrome (somewhat regularly) Latest Firefox Nightly E10s (less regularly)

laino commented 7 years ago

Thanks, this will help

laino commented 7 years ago

According to everyone I asked it's fixed now. Thanks for investigating.