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

[BUG] - Accordion prevents <Input/> or <Textarea/> children from working correctly #1608

Closed
samosaboy opened this issue Sep 11, 2023 · 4 comments · Fixed by #1630
Closed
Labels
🐛 Type: Bug Something isn't working

Comments

@samosaboy
Copy link

samosaboy commented Sep 11, 2023

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

  1. Use the base accordion example
  2. Add a text area using the Textarea example
  3. 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

@jrgarciadev
Copy link
Member

Fixed, install the latest version v2.1.13

@yewyewXD
Copy link

yewyewXD commented Nov 15, 2023

@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!

@alfredoPacheco
Copy link

alfredoPacheco commented Dec 4, 2023

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.

@alfredoPacheco
Copy link

I am temporarily doing this as a workaround:

<AccordionItem
            key={item.$id}
            ...
            onKeyDown={e => e.stopPropagation()}
          >
            ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants