Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Jogging with keyboard causes page to scroll #6

Open
iceboundflame opened this issue Jun 16, 2016 · 4 comments
Open

[Bug] Jogging with keyboard causes page to scroll #6

iceboundflame opened this issue Jun 16, 2016 · 4 comments

Comments

@iceboundflame
Copy link

On http://chilipeppr.com/jarret and /grbl, I noticed that if the window is larger than the page dimensions, jogging with the keyboard scrolls the page, which is kind of jarring. Can we lock the page scroll and capture the arrow keypresses when the jog command is active?

@chilipeppr
Copy link
Owner

Give it a try, but the way I solve it is by making sure no widgets are off
the page by collapsing unneeded ones.

On Thu, Jun 16, 2016 at 12:45 AM, David Liu [email protected]
wrote:

On http://chilipeppr.com/jarret and /grbl, I noticed that if the window
is larger than the page dimensions, jogging with the keyboard scrolls the
page, which is kind of jarring. Can we lock the page scroll and capture the
arrow keypresses when the jog command is active?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#6, or mute the thread
https://github.com/notifications/unsubscribe/AHidbVrYwTMOyzlYvOLOw7IXiraTaLzAks5qMP8egaJpZM4I3HEH
.

@cheton
Copy link

cheton commented Jun 22, 2016

How about preventing default browser action when the Axes widget is getting focused? For example:

window.addEventListener('keydown', function(e) { // arrow keys
    if([37, 38, 39, 40].indexOf(e.keyCode) > -1) {
        e.preventDefault();
    }
}, false);

@chilipeppr
Copy link
Owner

That's a great idea. Would it be possible for you to fork the github, make
change, and then do pull request?

On Wed, Jun 22, 2016 at 4:32 AM, Cheton Wu [email protected] wrote:

How about preventing default browser action when the Axes widget is
getting focused? For example:

window.addEventListener('keydown', function(e) { // arrow keys
if([37, 38, 39, 40].indexOf(e.keyCode) > -1) {
e.preventDefault();
}
}, false);


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#6 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AHidbfW9eH3M-iyaAnRcpdASiNg7ocqJks5qOR1pgaJpZM4I3HEH
.

@cheton
Copy link

cheton commented Jun 22, 2016

Sure! I can create a PR once I confirmed it works from my side. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants