Turns out that Firefox ignores attempts to set scrollTop to Number.MAX_VALUE. Clip it to scrollHeight.