Onscroll isn't always onscroll
In continuation of my experimentation with
position:fixed from yesterday, I decided to try and enhance the form slightly by having it check to see how close the comment form was to the top of the page. If it got too high, I'd change from
position:fixed like I did yesterday.
This should certainly resolve the issue for those at a resolution of 1024 by 768 that weren't able to fit the form onto the screen.
But what should have been a fairly simple procedure of using
window.onscroll turned into confusion, only to realize that, in Firefox 1.0.3, the onscroll event only fires when you physically drag the scroll bar. Wheel mouse doesn't fire anything. Well, I use my wheel constantly so that just wouldn't do. Instead, I set up a constant loop that calculates where I am. This works somewhat well. Except it's a little jerky with the slight delay in the scroll script.
UPDATE (Feb 23, 2007): The code is available in this article on handling