Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    dep
    dep is offline
    Regular Coder
    Join Date
    Nov 2005
    Posts
    121
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Scrollbar takes focus. Workarounds?

    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

  • #2
    New Coder mentalhorse's Avatar
    Join Date
    Jul 2005
    Location
    Duanesburg, NY
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Why is a raven like a writing desk?

  • #3
    dep
    dep is offline
    Regular Coder
    Join Date
    Nov 2005
    Posts
    121
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks. Will try this out.

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    There's no event on the scrollbar, but there is a blur event on form fields when they lose the focus.
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #5
    dep
    dep is offline
    Regular Coder
    Join Date
    Nov 2005
    Posts
    121
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Cool. Thanks!

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •