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

[Data Grid] Cell focus is too aggressive #2208

Closed
snide opened this issue Aug 7, 2019 · 7 comments
Closed

[Data Grid] Cell focus is too aggressive #2208

snide opened this issue Aug 7, 2019 · 7 comments

Comments

@snide
Copy link
Contributor

snide commented Aug 7, 2019

The cell focus in use in EuiDataGrid is a little too eager at the moment. We likely need the following usage changes.

  1. No focus should exist until the user clicks or tabs into the cells.
  2. Any outside action (including clicks or tabs on the menu systems, column sizing or pagination) should remove focus completely from the grid.
  3. If someone tabs back into the grid after the above, regardless of where the position previously was, it should reset back to [0,0]
  4. Changing the content or display of the grid should not focus it.
@chandlerprall chandlerprall self-assigned this Aug 7, 2019
@myasonik
Copy link
Contributor

myasonik commented Aug 8, 2019

How set are you on #3? The rest I agree are buggy things in my implementation but that was intentional.

It's not spelled out in the spec so I don't think we strictly have to keep it that way but every example did keep with that so, so did I. I think the workflow that it enables is: I'm doing something in the grid, I realize I need to change a setting or something, and then I want to come back to what I'm doing. If focus resets in that case, I have to navigate back to the cell where I was working instead of being able to pick up with where I was.

I'm sure there's some other workflow that's negatively impacted because there always is but nothing concrete comes to mind.

@snide
Copy link
Contributor Author

snide commented Sep 6, 2019

This was fixed in our feature branch. Thanks @myasonik

@snide snide closed this as completed Sep 6, 2019
@myasonik myasonik reopened this Oct 25, 2019
@myasonik
Copy link
Contributor

This seems to have resurfaced in the version we have merged into EUI so I'm reopening the issue.

@matthax
Copy link

matthax commented Nov 13, 2019

To me, three doesn’t seem like a problem, perhaps if necessary clearSelectionOnBlur could be an additional property. I like the behavior of preserving focus on the cell I was working in.

@myasonik
Copy link
Contributor

I think this ticket has become a little broad and confusing.

What I was talking about resurfacing is on page load, the grid steals focus immediately. (Focus should be on first focusable element of the page almost always.)

Everything else (including number 3 in the description) works as expected right now, I believe.

@chandlerprall
Copy link
Contributor

@myasonik can you test again when you get a chance? I'm not reproducing the auto-focus issue.

@myasonik
Copy link
Contributor

Can't reproduce it anymore! Closing this ticket!

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

No branches or pull requests

4 participants