

Ask HN: Does clicking voting arrows *sometimes* take you to a blank page? - tlrobinson

I'm wondering if it's just me or not. Sometimes when I click a voting arrow it takes me to a blank page instead of doing the Ajax request. I can't reliably reproduce this behavior though.<p>I'm using Safari / WebKit nightly.
======
maryrosecook
I get this. It's to do with logging in:

1\. Make sure you're logged out. 2\. Open two HN pages. 3\. Log in on one of
them. 4\. Click an up arrow on the other page (the one where you're not logged
in). 5\. The vote will get counted, but you'll be sent to a blank page.

I always figured it was a failure of the AJAX to check login status.

~~~
pmjordan
Ah, interesting observation. The difference is actually that the up arrows
don't have an onclick attribute if you're not logged in, so you end up with
the vote behaviour you normally get if you have JavaScript disabled.

~~~
maryrosecook
Ah, well spotted.

------
timf
Yes, this has happened to me many times. The only correlation I ever had a
hunch at was perhaps a long delay before hitting the arrow (like where I had
opened a new tab and gotten to it later).

Reloading the page (which at that point is the previous page) gets rid of the
problem.

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.5) Gecko/2009010220 Gentoo
Firefox/3.0.5

~~~
timf
_"long delay before hitting the arrow (like where I had opened a new tab and
gotten to it later)"_

Seems to fit with explanation from maryrosecook above, I'm often logged out.

------
pmjordan
It's not happened to me (Opera 9.63 x86_64 Linux) but I have a suspicion for
the possible cause: The up/down arrows are anchor tags to the vote URL, so if
you had JavaScript disabled, the behaviour you describe would be expected. (it
probably should redirect back to the page you were looking at, from a
usability POV...) The async version uses the onclick event attribute to call
the vote() JS function, which returns false to cancel the anchor click
navigation after dynamically generating a new image with the vote URL as src
attribute. If anything in vote() throws an exception, vote won't return false
to cancel the navigation, so you get taken to the (blank) non-JS vote page.

I can't see anything at first glance that would throw an exception, however.

------
cstejerean
Yes, it's happened to me with nightly WebKit builds and I figured out exactly
how to replicate it.

* Visit homepage * Click on some story link * Hit the back button to go back to the homepage * Try to vote up the link

It consistently happened any time I tried to vote after hitting the back
button. The solution was to always refresh the page after hitting the back
button. However, a recent nightly upgrade fixed the problem for me. Are you
running the latest WebKit?

------
pclark
nope (Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.5)
Gecko/2008120121 Firefox/3.0.5)

------
bprater
Another bug: expired links, with no link back to the homepage!

------
noodle
doesn't happen to me, but that doesn't mean it doesn't happen.

------
josefresco
If you can't replicate, there is no bug.

Nothing to see here, move on please.

~~~
pclark
how do you figure that?

~~~
bprater
Not enough time killing bugs in his career, I'm guessing.

