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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    mouse events and alternative methods of scrolling

    I've been working on a series of scripts for a DHTML content management system and have come across a pretty nasty snag in the way mouse events are not fired by the browser in certain scrolling instances.

    I have a bunch of elements on a page, that perform an action when the mouse enters the element (onmouseover). I'm come to realize that when the mouse is within the content area of the page and you choose to scroll by using an alternative method to the scrollbars (such as the mouse wheel or arrow keys), mouse events won't fire because the mouse isn't moving, only the page underneath the mouse is. So, if by scrolling the page with arrow keys, my mouse pointer lands on top of one of these elements, the onmouseover event will not fire until I move the mouse at least one pixel.

    Does anyone know of a work around for this issue?

    Thanks!

  • #2
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yeah, from the onscroll event, determine pointer position from event properties, and compare that to element position, to call element.onmouseover(), when necessary.

    The scrollTop property may be needed for the y-pos, by the way.
    Last edited by codegoboom; 04-13-2005 at 09:39 AM. Reason: N/A
    *this message will self destruct in n-seconds*


  •  

    Posting Permissions

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