jacobwb / hashover-next

This branch will be HashOver 2.0
GNU Affero General Public License v3.0
419 stars 87 forks source link

Use {block:'start',inline:'nearest'} when scrolling to comment #226

Closed CyberShadow closed 5 years ago

CyberShadow commented 6 years ago

Improve consistency and reduce the chance of confusion by aligning the comment to the top of the window frame when scrolling to a comment, as it would be when scrolling without JavaScript, and as it is when clicking or following a comment ID on the same page.

jacobwb commented 5 years ago

Thank you for pointing this out, I added Element.scrollIntoView before it was as widely supported. Most browsers support it now, but seem to treat it differently, though. This is a nice fix.