Forums : Feedback Forum

Dear Open Hub Users,

We’re excited to announce that we will be moving the Open Hub Forum to https://community.blackduck.com/s/black-duck-open-hub. Beginning immediately, users can head over, register, get technical help and discuss issue pertinent to the Open Hub. Registered users can also subscribe to Open Hub announcements here.


On May 1, 2020, we will be freezing https://www.openhub.net/forums and users will not be able to create new discussions. If you have any questions and concerns, please email us at info@openhub.net

Annoying javascript bug

Several ohloh pages (home, forums) automatically set the input focus into a text field (search project, search posts, ...) after loading the page. The intention of this may be good, but that's of absolutely no use if I have already scrolled down half the page, because the focus setting also leads to scrolling back to the top of the page.
So please add a check to your javascript code so that the text field only gets the input if the scrollbar is still at the topmost position.

Th

Bananeweizen over 17 years ago
 

i hate that behavior too. I hadn't thought of the scrollbar check - that's pretty clever. Would you prefer we just yank the whole focusing behavior? I kinda would...

Jason Allen over 17 years ago
 

Yes, I'd prefer removing it completely, if that's an option.

To my mind this focusing only really makes sense on pages where input is mandatory (e.g. on the create new project page, the login page or similar ones). But even then I might already have entered some text when the onload event is finally fired, so also then it should be checked that the currently focused control isn't one of the other form input elements.

BTW: In general ohloh makes clever use of Javascript (nicely formatted input help and other things), so don't let this issue stop you adding more little scripts.

Bananeweizen over 17 years ago