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

Hotkeys only work if value returned from render is a DOM element #1725

Closed
gscshoyru opened this issue Oct 16, 2017 · 0 comments · Fixed by #3635
Closed

Hotkeys only work if value returned from render is a DOM element #1725

gscshoyru opened this issue Oct 16, 2017 · 0 comments · Fixed by #3635

Comments

@gscshoyru
Copy link
Contributor

Bug report

  • Package version(s): Latest
  • Browser and OS versions: macOS Sierra

Steps to reproduce

  1. Use HotkeysTarget on a class where what's returned from render is a React Component and not a DOM element

Actual behavior

Hotkeys fails to work at all (element is not focus-able, pressing keys don't work)

Expected behavior

Hotkeys work as expected.

Plausibly somewhat related to #931 . The issue is we're cloning the child and adding "onKeyDown" and "tabIndex" props to what we clone -- and if we pass these props to something that's not a DOM element, these props (reasonably) do nothing.

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

Successfully merging a pull request may close this issue.

4 participants