[BUG] - Accordion prevents <Input/> or <Textarea/> children from working correctly
NextUI Version
2.1.12
Describe the bug
When using <Accordion> and <AccordionItem>, if the nested children are of <Input /> or <Textarea /> type, their input commands are not registered. For example, you are unable to use the "Spacebar" key and most punctuations.
Your Example Website or App
https://codesandbox.io/s/morning-firefly-yscnvz?file=/src/App.js
Steps to Reproduce the Bug or Issue
- Use the base accordion example
- Add a text area using the Textarea example
- Observe that punctuations, spacebar and at times regularly input is not registered correctly
Expected behavior
As a user, I expect input and textarea to function regularly and as expected when inside the accordion.
Screenshots or Videos
No response
Operating System Version
macOS
Browser
Opera
Fixed, install the latest version v2.1.13
@jrgarciadev The same problem still happens for @nextui-org/table (current version - 2.0.28). A normal HTML <input/> or <textarea/> element in a <TableCell/> has problem entering the space bar. Sometimes the spacebar works, sometimes it doesn't. Can you please check? Thanks a lot!
It seems we are not able to use Arrows Keys (Up and Down) when using TextArea inside an Accordion.
I forked @samosaboy sandbox and upgraded to lastest NextUI version. sanbbox
Please enter at least two lines in a Textarea to test. And the same applies to any other control inside an Accordion, in my case I was using TipTap.
I am temporarily doing this as a workaround:
<AccordionItem
key={item.$id}
...
onKeyDown={e => e.stopPropagation()}
>
...