Opened 11 years ago

Closed 6 years ago

#7286 closed defect (patchwelcome)

Navigating through cells with keyboard

Reported by: cuicui666 Owned by: Bryan Forbes
Priority: high Milestone: future
Component: DojoX Grid Version: 1.1.0
Keywords: grid key edit focus cell a11y Cc:
Blocked By: Blocking:

Description

Hello,

I've created a grid with cells that can be edited. I now want to add the ability to move from one cell to another using the keys UP, DOWN, LEFT and RIGHT

So I did this to catch the keyboard events :

dojo.connect(grid, 'onKeyDown', this, _keyDown);

I attached a complete test file so that you can reproduce the bug yourself, with the function _keyDown included.

The piece of code is working fine if you navigate slowly. But if you stay pressed on the DOWN arrow for example, everything is messed up inside the grid, the values of the cells are copied from one to another, the row selected is different from the row with the edited cell.

The way to reproduce this bug : 1/ Click on one of the editable cell of the first column (cause it has different values from one row to another) 2/ Press left,right,down and up arrows one at a time, to see that navigation is working fine when you do things slowly 3/ Stay pressed on the DOWN arrow now, with the key-repeat everything will go faster 4/ Notice that everything is messed up, sometimes values are copied from one row to another, sometimes you can see two editable cells in one column

Strangely, this bug doesn't occur with the firefox preview of Aptana Studio on my computer (don't know if this information will help though)

Browser version : Firefox 3.0 Operating system : Windows XP or Debian Error message : none Contact address : denis.george@…

Attachments (2)

test_change_structure.html (5.8 KB) - added by cuicui666 11 years ago.
I modified this dojo test file to make a test case
test_grid_1.2.html (6.9 KB) - added by cuicui666 11 years ago.
Test with Grid 1.2

Download all attachments as: .zip

Change History (11)

Changed 11 years ago by cuicui666

Attachment: test_change_structure.html added

I modified this dojo test file to make a test case

comment:1 Changed 11 years ago by Bryan Forbes

Milestone: 1.2

Would you mind trying this on trunk? We've recently done a refactor of the grid and keyboard navigating works much better now.

Changed 11 years ago by cuicui666

Attachment: test_grid_1.2.html added

Test with Grid 1.2

comment:2 Changed 11 years ago by cuicui666

It seems to be worse with grid 1.2 but you should probably check the way I did the refactor :-)

comment:3 Changed 11 years ago by bill

Milestone: 1.21.3

comment:4 Changed 11 years ago by Bryan Forbes

Milestone: 1.31.2

comment:5 Changed 11 years ago by Bryan Forbes

Milestone: 1.21.3

comment:6 Changed 11 years ago by Adam Peller

Keywords: a11y added

comment:7 Changed 10 years ago by Bryan Forbes

Milestone: 1.3future

This will be an invasive change since it will change how the keyboard is handled and we need to change to using keypress instead of keydown in the event handler. Pushing to future.

comment:8 Changed 6 years ago by bill

DojoX Grid and EnhancedGrid are deprecated in favor of dgrid and gridx.

You should upgrade your code to use one of those two grids.

We will consider patches to the old DojoX Grid code though.

comment:9 Changed 6 years ago by bill

Resolution: patchwelcome
Status: newclosed
Note: See TracTickets for help on using tickets.