"Remember Vertical Pos" determines whether the comment thread tries to keep track of how far down it you've scrolled. If it's set to "yes" and you've previously viewed a thread, then the next time you open that thread you'll automatically be brought to the same scroll distance as you left it (the distance is measured twice a second). Presumably this will bring you to the last comment you read.
If the "Remember Vertical Pos" value is set to "no", or you haven't visited the thread before, or you've just cleared your browser's cookies, then the "default to" value will kick in, and send you either to the top or to the bottom of the thread.
Seems great to me. Except for a minor thing, which is I don't think the "default" behavior works properly with FireFox. When I open a comments thread I have never looked at before, the "Name" text box is active and the vertical scroll is down far enough to show the the active input box. (This is the same as how it used to work before the preferences were added.) Regardless, a neato innovation.
11: that's intentional. The default behavior is the same as the site's previous functionality, since that's how ogged likes it. In fact, the textbox-focusing code was lifted directly from the old template.
Also: mobile edition? Awesome. Although I should point out that comments don't work on my sidekick, for some reason. I think it may be because of the space at the end of the form tag's "action" attribute. I really should have fixed that while I had the chance.
Thanks, Tom. Your code is already helping me feel less stupid in the great Unfogged Wittthon. At least I know where I was, before the clever people started being clever.
yay
Posted by Standpipe Bridgeplate | Link to this comment | 11-19-05 9:18 PM
Truly, we are commenting in the lap of luxury.
Posted by Adam Kotsko | Link to this comment | 11-19-05 11:29 PM
So, does "vertical pos" mean anything, or is it there just to confuse you?
Posted by David Weman | Link to this comment | 11-19-05 11:46 PM
"Remember Vertical Pos" determines whether the comment thread tries to keep track of how far down it you've scrolled. If it's set to "yes" and you've previously viewed a thread, then the next time you open that thread you'll automatically be brought to the same scroll distance as you left it (the distance is measured twice a second). Presumably this will bring you to the last comment you read.
If the "Remember Vertical Pos" value is set to "no", or you haven't visited the thread before, or you've just cleared your browser's cookies, then the "default to" value will kick in, and send you either to the top or to the bottom of the thread.
Posted by tom | Link to this comment | 11-20-05 1:04 AM
Whoops -- if you've cleared your browser's cookies, then the "default to" value will default to "bottom".
Posted by Anonymous | Link to this comment | 11-20-05 1:10 AM
Very cool, Tom. Great job!
Posted by Becks | Link to this comment | 11-20-05 11:49 AM
huzzah!
Posted by mcmc | Link to this comment | 11-20-05 5:20 PM
Tom, is the scroll distance measured in percentage of the document length or an absolute measure?
Posted by pdf23ds | Link to this comment | 11-20-05 6:40 PM
Absolute. It's the number of pixels from the top of the document.
Posted by tom | Link to this comment | 11-20-05 7:02 PM
This is quite useful, thanks.
Posted by washerdreyer | Link to this comment | 11-20-05 9:13 PM
Seems great to me. Except for a minor thing, which is I don't think the "default" behavior works properly with FireFox. When I open a comments thread I have never looked at before, the "Name" text box is active and the vertical scroll is down far enough to show the the active input box. (This is the same as how it used to work before the preferences were added.) Regardless, a neato innovation.
Posted by Jeremy Osner | Link to this comment | 11-21-05 10:27 AM
Tom and I have agreed elsewhere that the current implementation is less than satisfactory.
Posted by ben wolfson | Link to this comment | 11-21-05 11:05 AM
Now, how about making a version of the site suitable for handhelds? I spent the morning in a *really* boring meeting.
Posted by Chopper | Link to this comment | 11-21-05 11:12 AM
That already exists. I'd tell you I'll add a link to it on the sidebar, but it would probably be a lie.
Posted by ogged | Link to this comment | 11-21-05 11:14 AM
Tops and bottoms unite!
(or was that teh obvious?)
Posted by Doug | Link to this comment | 11-21-05 3:03 PM
11: that's intentional. The default behavior is the same as the site's previous functionality, since that's how ogged likes it. In fact, the textbox-focusing code was lifted directly from the old template.
And Wolfson's just making trouble.
Posted by tom | Link to this comment | 11-21-05 4:17 PM
Also: mobile edition? Awesome. Although I should point out that comments don't work on my sidekick, for some reason. I think it may be because of the space at the end of the form tag's "action" attribute. I really should have fixed that while I had the chance.
Posted by tom | Link to this comment | 11-21-05 4:22 PM
Making trouble, perhaps, but not lying (scroll to comments).
Posted by ben wolfson | Link to this comment | 11-21-05 5:09 PM
Hey! You fixed it! Thanks, ogged. I'm posting this from my SK, in fact.
Ben, I'll continue my exhaustive and devastating rebuttal back on the thread at my site.
Posted by tom | Link to this comment | 11-21-05 7:32 PM
I didn't do a thing, placebo boy.
Posted by ogged | Link to this comment | 11-21-05 7:38 PM
"continue"?
Posted by ben wolfson | Link to this comment | 11-21-05 7:45 PM
Thanks, Tom. Your code is already helping me feel less stupid in the great Unfogged Wittthon. At least I know where I was, before the clever people started being clever.
Posted by Jackmormon | Link to this comment | 11-22-05 12:21 AM
Hmm. Okay, I guess that my phone's recent software update is what fixed the problem. Nuts to ogged.
Posted by tom | Link to this comment | 11-22-05 10:42 AM