-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to annotate on page with many annotations #319
Comments
I can reproduce on the example page at localhost:3000 starting with an empty set of annotations as follows:
For the first 11 annotations this scrolled the sidebar correctly. For the 12th annotation it did not. When reproducing the results might vary by screen height since I'm guessing this relates to windowing/virtualization of the thread list. |
In my test on that article, creating an annotation at the first word resulted in the sidebar opening with no editor visible. However when I scrolled down by a view cards then an editor appeared. |
After an initial investigation, the problem is that the logic which computes the position to scroll to after a new annotation is added to the sidebar always returns 0, so the sidebar never scrolls. This is due to function scrollOffset(id) {
// Note: This assumes that the element occupies the entire height of the
// containing document. It would be preferable if only the contents of the
// <thread-list> itself scrolled.
var maxYOffset = document.body.clientHeight - window.innerHeight;
return Math.min(maxYOffset, visibleThreads.yOffsetOf(id));
} PR #306 set the height of the In addition to the problem of the scroll offset being calculated as zero, there is also an issue of when the scroll is triggered. The |
Steps to reproduce
Expected behaviour
Sidebar should open with the editor selected.
Actual behaviour
Sidebar opens with no editor visible. Scrolling around the sidebar does not reveal the editor.
Browser/system information
Chrome 57.0.2987.98
Extension version 1.6.0.0 (Official Build)
Additional details
Screenshot attached

The text was updated successfully, but these errors were encountered: