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

Keeping Icon focus state only for keyboard #1234

Merged
merged 4 commits into from
Nov 10, 2020
Merged

Conversation

aleksfront
Copy link
Contributor

Removing :focus styles for <Icon /> component when using mouse. This fixes issue when Icon seems frozen in hover state even if cursor went away.

Determining mouse/keyboard usage by toggling .mouse-intent class name on body element.

Added outline styling for Icon's :focus state.

keyboard focusing
mouse focusing

Close #1228

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
@aleksfront aleksfront requested a review from a team November 5, 2020 13:53
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
@aleksfront
Copy link
Contributor Author

@ixrock Please do re-review. Replaced custom solution with what-input dependency which could track used input device
https://www.npmjs.com/package/what-input
https://bundlephobia.com/result?p=what-input@5.2.10

@aleksfront aleksfront requested a review from ixrock November 10, 2020 07:59
@aleksfront aleksfront merged commit b2f3cdd into master Nov 10, 2020
@aleksfront aleksfront deleted the fix/icons-active-state branch November 10, 2020 09:36
@jakolehm jakolehm mentioned this pull request Nov 10, 2020
pauljwil pushed a commit to pauljwil/lens that referenced this pull request Nov 11, 2020
* Passing toolbar prop into action menus

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Toggling .mouse-intent

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Icon focus restyling

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Adding what-input dependency

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Weird icons active/hover state
2 participants