3

Clicked on the StackExchange dropdown to navigate to another site, and...

The unexpected landing point after using the StackExchange dropdown on the Topbar

From other pages (in another tab) the behaviour is normal.

Then I noticed the url: http://stackoverflow.com/questions/26725199/trim-functions-in-cobol/26777329?noredirect=1#comment42135785_26777329

Using that url, for me, it is repeatable.

I had the question in a tab, had typed a comment into the answer box(!), then added it as a comment on an answer and submitted. A few minutes later I refreshed the tab, to see if the answer had been edited. It had instead been deleted. I had perhaps viewed the answerer's profile in between making the comment and doing the refresh.

Perhaps not easy to reproduce, and, if this is the only example, not very important.

22
  • 2
    You may have clicked it before JavaScript had a chance to register the on click event (or for some reason JavaScript didn't execute/load). In markup the logo/drop down is a link to se.com
    – Oded
    Nov 6, 2014 at 13:08
  • I'm faster than JavaScript? I did try to recreate on other tabs starting from the question. I was disappointed that the answer had been deleted, so there was a pause. However, thinking now, I may have clicked harder than usual. Double-click with very short interval? Nov 6, 2014 at 13:12
  • Nope. Can't get anywhere with that. Nov 6, 2014 at 13:14
  • 1
    could have been some network blip too...
    – Oded
    Nov 6, 2014 at 13:18
  • When I paste this to the end of a url, the effect occurs ?noredirect=1#comment42135785_26777329. Doctor, doctor, it hurts when I do this. Doctor - so stop doing that, then. Nov 6, 2014 at 13:19
  • Perhaps it was within five minutes of posting the comment, which was no longer there, but in the url even after the refresh? Nov 6, 2014 at 13:21
  • 1
    I can't repro either - even with the fragment identifier at the end of the url.
    – Oded
    Nov 6, 2014 at 13:22
  • OK, just a curiosity then. Even clearing my browser cache (Firefox 33.0, Ubuntu canon stuff) I can paste that on to any question I choose at random and it happens. On SO and MSO. Nov 6, 2014 at 13:29
  • @Oded I've just tried from a different machine. Pasting ?noredirect=1#comment42135785_26777329 to the end of the url of this question causes the effect. For me. Nov 6, 2014 at 13:33
  • 1
    Is that comment link on the same post? Or a comment on a different post?
    – Oded
    Nov 6, 2014 at 14:12
  • @Oded The comment link is from the original question, the comment was deleted along with the answer. So for me the comment doesn't exist anymore. For someone with more power... Nov 6, 2014 at 14:16
  • But when I paste it (exactly the same) to any random question, the same thing happens. Nov 6, 2014 at 14:17
  • 1
    Ah. That may be a good part of the issue. If the comment fragment isn't on that page.
    – Oded
    Nov 6, 2014 at 14:18
  • @Oded OK. Thanks for the assistance. Nov 6, 2014 at 14:19
  • 1
    Yeah. Confirmed - in Windows 7, latest Chrome and FF 33.02 (though probably across the board)
    – Oded
    Nov 6, 2014 at 14:20

1 Answer 1

4

Looks like it was easier to fix than I initially thought.

The (corner?) case here was only that of hitting a comment link to a post that has since been deleted.

I've added a guard clause against that, and JS (including the sites dropdown) shouldn't break under these conditions.

With you in the next build (rev 2014.11.6.1996, meta rev 2014.11.6.2728).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .