• Robert Knight's avatar
    Fix scrolling to new annotations · 09086090
    Robert Knight authored
    Since #306 which set the height of the `<hypothesis-app>` container
    element to 100%, the height of `document.body` is now equal to the
    window's `innerHeight`. As a result, `document.body.clientHeight` now
    returns the same value as `window.innerHeight` and `scrollOffset()`
    returns 0.
    
    Fix this by using `scrollHeight` instead of `clientHeight`, which takes
    into account the height of all of the body's descendant elements,
    including the `<thread-list>`.
    
    This calculation would still return the wrong result if the
    `<thread-list>` were ever placed in a separate scrolling container
    within the sidebar app window, but that is an acceptible limitation for
    now.
    09086090
Name
Last commit
Last update
.github Loading commit data...
docs Loading commit data...
images Loading commit data...
scripts Loading commit data...
src Loading commit data...
.eslintignore Loading commit data...
.eslintrc Loading commit data...
.gitignore Loading commit data...
.npmignore Loading commit data...
.npmrc Loading commit data...
.travis.yml Loading commit data...
CHANGELOG.md Loading commit data...
CODE_OF_CONDUCT Loading commit data...
Jenkinsfile Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
gulpfile.js Loading commit data...
npm-shrinkwrap.json Loading commit data...
package.json Loading commit data...
requirements-dev.in Loading commit data...