Describe the Bug
The current implementation of ViewLayoutWriter adjusts the empty space on the document margins by adjusting the horizontal scroll offset. This makes the document bounce around when the window is resized. There's a listener somewhere centering the document when the window is resized & then we have our callbacks adjusting the scroll. I think code which "centers the document" should be aware of comments and should adjust the document position there itself.