How to prevent page scrolling when user uses keydown for SVG application?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • luftikus143
    New Member
    • Jan 2007
    • 97

    How to prevent page scrolling when user uses keydown for SVG application?

    Hi there,

    on my webpage the user has the possibility to click in a SVG chart and use arrows to navigate up and down. However, the keydown not only moves the SVG elements down (as it should do), but it scrolls the whole page down - so, two things are moving at the same time, and it's really annoying, as the user can hardly see what happens in the SVG graph.

    Is there any possibility to stop page scrolling per arrow keys for that moment?

    Thanks for any hints.
  • luftikus143
    New Member
    • Jan 2007
    • 97

    #2
    Ha, found it: e.preventDefaul t();

    Comment

    Working...