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

ExpandableTile collapses if focus is in a child TextInput and user hits spacebar #8633

Closed
1 of 2 tasks
MarcelPoirier opened this issue May 10, 2021 · 0 comments · Fixed by #8638
Closed
1 of 2 tasks

Comments

@MarcelPoirier
Copy link

MarcelPoirier commented May 10, 2021

What package(s) are you using?

carbon-components-react 7.17.0

  • carbon-components
  • carbon-components-react

Detailed description

If you're using a ExpandableTile and have a TextInput inside the TileBelowTheFoldContext, the tile will collapse if the user hits the spacebar when the TextInput has focus.

Spacebar should only expand / collapse the ExpandableTile if the tile has focus, hitting space while typing text in the TextInput show now affect the Tile.

Tested in Chrome / Firefox / Safari on macbook

"carbon-components-react": "7.17.0"

Issue was found in Cognos Analytics.

Steps to reproduce the issue

  1. Use an ExpandableTile and insert a TextInput as a child of the TileBelowTheFoldContent.
  2. Try typing a space in the input. BUG, the tile will collapse

Please create a reduced test case in CodeSandbox
https://codesandbox.io/s/expandabletilewithtextinput-uygbp?file=/index.js:593-616

Additional information

All I did here is hit the spacebar.
spacebar

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.

2 participants