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

Arrow keys should move selection to cell next/previous/above/below cell #3227

Closed
pjasiun opened this issue Sep 6, 2018 · 5 comments
Closed
Labels
package:table resolution:duplicate This issue is a duplicate of another issue and was merged into it. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@pjasiun
Copy link

pjasiun commented Sep 6, 2018

Generalised issue

Arrow keys work differently in all browsers and in all of them they don't do what the user would expect:

  • Chrome moves the selection to the right cell if you press down arrow.
  • In Firefox arrow keys don't do anything useful.

We need a custom handler for arrow keys. However, it's a non-trivial task due to issues described in https://github.com/ckeditor/ckeditor5-table/issues/108#issuecomment-465529187. We will need to, at least partially, use the browser native handling and try to do something with that.

Original issues

I wanted to fill the table column and I was surprised that when I press down key selection moved to the cell on the right, not below. The same for arrow up - selection should be moved to the cell above, not on the left. The current behavior makes filling column very inconvenient.

@jodator
Copy link
Contributor

jodator commented Sep 6, 2018

I AFAICS we left it to the browsers. But also for me the expected behavior is such that using arrows would allow to navigate up/down visually as it does on Chrome.

ps.: it works as described in Firefox

@Reinmar
Copy link
Member

Reinmar commented Sep 6, 2018

Yep, for now we do nothing and let the browser decide. We can change it at any time.

@Reinmar
Copy link
Member

Reinmar commented Feb 20, 2019

Just so you know – this is a tricky issue. Pressing down arrow in a cell might move the selection to another line of text in the same cell or may need to move it to another cell. We may look for some hacks though, like handling the arrow keys only if the selection is at the very beginning/end of a cell. That'd handle empty cells as wells as non-empty ones but with an additional step of first moving your caret to the very end of the content and then moving to the next cell.

@Reinmar
Copy link
Member

Reinmar commented Feb 20, 2019

@Reinmar Reinmar changed the title Up/down arrow keys should move selection to cell above below Arrow keys should move selection to cell next/previous/above/below cell Feb 20, 2019
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-table Oct 9, 2019
@mlewand mlewand added this to the nice-to-have milestone Oct 9, 2019
@mlewand mlewand added status:confirmed type:bug This issue reports a buggy (incorrect) behavior. package:table labels Oct 9, 2019
@jodator
Copy link
Contributor

jodator commented Apr 29, 2020

Closing as already implemented and a dup of #3267.

@jodator jodator closed this as completed Apr 29, 2020
@jodator jodator removed this from the nice-to-have milestone Apr 29, 2020
@jodator jodator added the resolution:duplicate This issue is a duplicate of another issue and was merged into it. label Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:table resolution:duplicate This issue is a duplicate of another issue and was merged into it. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

4 participants