Win8.1 @ Chrome 35.0.1916.153
I’m not here to report a bug - mainly because I’ve heard on IRC that you are aware of it - but rather suggest a possible bugfix for one.
Whenever I copy a direct link to a comment, and open it later, the browser window would not jump to the correct comment. I have a suggestion that might help address this issue.
I tested the JS code using the Chrome Developer Console before posting this.
Here’s an image of the rendered HTML of a comment:
I think the highlighted part should be
id
instead of
name
. Also, as far as I could tell, the comments are loaded in post via JavaScript, and the site seems to use jQuery, so this issue could be fixed by adding a few extra lines to the code after the part that displays the comments:
@var wlhash = window.location.hash,
regex = /^#comment_[0-9a-f]{24}$/,
offset = $(wlhash).offset();
if (regex.test(wlhash) && typeof offset !== ‘undefined’) $(window).scrollTop(offset.top);@
Of course, this does not take into account the fact that some comments might be on different pages, but since the whole loading is done by JS, the
window.location.hash
could be easily read to detect the desired comment’s identifier, then it’s just a matter of a few additional lines to load the page the comment is on by default.