By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,701 Members | 1,782 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,701 IT Pros & Developers. It's quick & easy.

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

P: 97
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.
Jan 13 '12 #1
Share this Question
Share on Google+
1 Reply


P: 97
Ha, found it: e.preventDefault();
Jan 13 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.