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

Fix behavior after copying a color #23

Closed
wants to merge 1 commit into from
Closed

Fix behavior after copying a color #23

wants to merge 1 commit into from

Conversation

TJScalzo
Copy link
Contributor

@TJScalzo TJScalzo commented Oct 24, 2019

I updated the changes made for #11 so that focus returns to the table when a color is copied. Currently, the focus is just removed and hitting tab brings the user back up to the top of the page (because of f83946c). This pull request matches the behavior to what was introduced in #18.

Aligns feature from #11 with functionality introduced by #18
@edelstone
Copy link
Owner

edelstone commented Oct 24, 2019

@TJScalzo This is an improvement because it standardizes focus intent across browsers, but let me suggest something:

The way Chrome treats tabbing after a copy is even more ideal (I'm referring to the current version before your changes btw). After copying, the focus appears to stay on the copied cell even though the copy/checkmark button disappears. If you tab again from this position, the next table cell is focused. This seems logical to me, but perhaps more importantly it prevents page jumps, which can happen by focusing the table (depending on your browser height and scroll position, of course).

Play with the current site in Chrome and let me know if you agree and if it's hard to achieve. I wouldn't mind if all browsers behaved like this.

@TJScalzo
Copy link
Contributor Author

It's interesting that in Chrome the focus retains its location on the page when .blur() is run. I haven't seen that on any other browsers. I think I have an idea of how to implement the functionality you're describing.

@TJScalzo TJScalzo changed the title Copying a color sets focus back to table Fix behavior after copying a color Oct 28, 2019
@edelstone
Copy link
Owner

We, of course, would Ideally want to maintain the experience for mouse users in terms of focus outlines, scrolling, etc. So let’s try to preserve that.

@TJScalzo
Copy link
Contributor Author

TJScalzo commented Nov 6, 2019

I'm having some trouble implementing this behavior. If anyone else is interested in helping out, go for it.

@edelstone
Copy link
Owner

I may just make an issue for this and close the PR.

@edelstone
Copy link
Owner

I created an issue for this in #26. Thanks for the effort.

@edelstone edelstone closed this Nov 8, 2019
@TJScalzo TJScalzo deleted the patch-1 branch November 14, 2019 16:54
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

Successfully merging this pull request may close these issues.

2 participants