mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
01e2fbde7c
fixes https://github.com/TryGhost/Team/issues/1729 refs https://github.com/TryGhost/Team/issues/1730 Please note that it only works on initial page load for now. Browsers have custom implementations for handling URL hashes/fragments that mess with the scroll position if you reload a page. We need a special JS based handling of the URL fragment/hash because: - We should only scroll after the comments have loaded, else we risk landing on a higher position on the page due to content height changes. - The DIV we scroll to (#ghost-comments-root) is inserted via JS, making it more difficult to scroll to it without JS. - We cannot wrap the `<script>` tag that loads the comments with a different DIV that has an id where we can scroll to. This would break themes and would make it harder to work with existing CSS grids (tried this first). And we still have the first issue too if we use this. |
||
---|---|---|
.. | ||
comments-ui |