-
Notifications
You must be signed in to change notification settings - Fork 295
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
Feature Request: Keyboard Navigation "Tab" #267
Comments
Yes, it's possible. On Aug 27, 2012, at 23:28, duckwilliamson [email protected] wrote:
|
Using dgrid on(grid, 'keydown', function(e){
if(e.keyCode === keys.TAB){
Keyboard.moveFocusRight.call(grid, e);
}
}); |
Indeed; you could also potentially do something like: grid.addKeyHandler(keys.TAB, Keyboard.moveFocusRight); This works since handlers registered via |
Hmm I get an error Keyboard.moveFocusRight is not defined? |
Are you working with dgrid 0.3.6? As noted by @phated, that's when this was added. |
Is it also possible to have the Keyboard.moveFocusLeft on a key-combination like SHIFT+TAB (for Excel style navigation) ? |
As I mentioned in my previous response, that should be feasible, though it'd require more work since you'd need to actually write a function to call |
It seems |
@phated: Your example worked well for me using and editable cell. Thanks! It also easily supports the SHIFT+TAB request by @frabe with a minor mod: on(this.grid, 'keydown', function (e) {
if (e.keyCode === keys.TAB) {
if (!e.shiftKey) {
Keyboard.moveFocusRight.call(that.grid, e);
} else {
Keyboard.moveFocusLeft.call(that.grid, e);
}
}
}); @duckwilliamson: You may want to close this issue to help keep things cleaned up. This solution seems to me to be a good answer. But maybe I'm missing something? |
I have no idea even where to begin with this, or I'd implement a potential patch. It would be very useful if, maybe using the Keyboard Mixin, we could hit Tab and go to the next cell for editing. Has anyone considered this before? Is it possible?
The text was updated successfully, but these errors were encountered: