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] - Cannot use up/down arrow keys in Textarea rendered in Accordion #2152

Closed
tuxracer opened this issue Dec 20, 2023 · 3 comments · Fixed by #3419
Closed

[BUG] - Cannot use up/down arrow keys in Textarea rendered in Accordion #2152

tuxracer opened this issue Dec 20, 2023 · 3 comments · Fixed by #3419
Assignees
Labels
🐛 Type: Bug Something isn't working

Comments

@tuxracer
Copy link

tuxracer commented Dec 20, 2023

NextUI Version

2.2.9

Describe the bug

If a Textarea component is rendered as a child of an AccordionItem a user is unable to use up/down arrow keys in the Textarea

Your Example Website or App

https://codesandbox.io/p/devbox/sharp-wildflower-knr8fv?file=%2FApp.jsx%3A17%2C5

Steps to Reproduce the Bug or Issue

export default function App() {
  return (
    <Accordion>
      <AccordionItem key="1" title="Accordion 1">
        <Textarea />
      </AccordionItem>
    </Accordion>
  );
}

Expected behavior

A user should be able to use up/down arrow keys to move their text cursor inside the Textarea

Screenshots or Videos

No response

Operating System Version

macOS

Browser

Chrome

@tuxracer tuxracer added the 🐛 Type: Bug Something isn't working label Dec 20, 2023
@itsEricWu
Copy link

I also have this issue in another scenario.

When having Input inside the AccordionItem component, the use of the "white space key" (Spacebar) triggers the event listener assigned to the accordion itself, rather than allowing for standard text input in fields within the accordion.

@saguirre
Copy link

Same issue attempting to use an Input component inside a Dropdown component. Tried several workarounds with onKeyPress and onChange but no luck.

@tuxracer
Copy link
Author

tuxracer commented Jan 5, 2024

FYI this workaround is working for me #1608 (comment)

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