...

View Full Version : Scrollbar takes focus. Workarounds?



dep
01-24-2006, 09:04 PM
Firstly, many apologies if I haven't had the chance to thank everyone for all their endless generousity around here. Things have been extremely hectic and I'm rushing as much as possible to get things done. So I really do apologize. I am very appreciative of everyones kindness, and didn't mean to burn any bridges.

My question is, there's a known bug in IE6 where the focus in your form is lost when someone clicks on the scrollbar. Are there any javascript workarounds for this?

cheers,
dep

mentalhorse
01-24-2006, 09:10 PM
I don't think clicking the scrollbar would fire an event. But if it does than that would be a way. Just set a listener to the clicking of the scrollbar and add the javascript to focus on the form.

dep
01-24-2006, 09:14 PM
Thanks. Will try this out.

brothercake
01-24-2006, 09:48 PM
There's no event on the scrollbar, but there is a blur event on form fields when they lose the focus.

dep
01-24-2006, 10:50 PM
Cool. Thanks!

brothercake
01-25-2006, 05:02 PM
Just an FYI - I don't know what you're planning to do with this - but you absolutely must not use this to force a form element to retain focus.

Detecting that the focus leaves a field for styling or validation purposes is one thing, but you must not programmatically move the focus back to the field, because that's counter accessibility - it forces a change in the natural browsing behaviour, which can be anything from annoying to fundamentally broken, depending on the needs of the user.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum