3 ms·
Ask HN: Does clicking voting arrows *sometimes* take you to a blank page?
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.
I'm using Safari / WebKit nightly.
- noodle 18y agodoesn't happen to me, but that doesn't mean it doesn't happen.
- pclark 18y agonope (Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.5) Gecko/2008120121 Firefox/3.0.5)
- josefresco 18y agoIf you can't replicate, there is no bug. Nothing to see here, move on please.
- pclark 18y agohow do you figure that?
- bprater 18y agoNot enough time killing bugs in his career, I'm guessing.
- tlrobinson 18y agoNo, non-deterministic bugs are in fact the worst kind of bugs. Absolutely maddening. Except maybe these: http://en.wikipedia.org/wiki/Unusual_software_bug http://en.wikipedia.org/wiki/Unusual_software_bug Anyway, if this or the equivalent were hidden somewhere in your code, and it wasn't supposed to be, would you not consider it a bug just because it only happened 1 in 10,000 runs or so? if (rand() % 10000 == 0) exit(0);
- timf 18y agoYes, 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 18y ago"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.
- maryrosecook 18y agoI 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 18y agoAh, 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 18y agoAh, well spotted.
- pmjordan 18y agoIt'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.
- bprater 18y agoAnother bug: expired links, with no link back to the homepage!
- cstejerean 18y agoYes, 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?