• 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
..
annotator Loading commit data...
boot Loading commit data...
images/icons Loading commit data...
shared Loading commit data...
sidebar Loading commit data...
styles Loading commit data...
karma.config.js Loading commit data...
tsconfig.json Loading commit data...