nextui icon indicating copy to clipboard operation
nextui copied to clipboard

[BUG] - It's not possible to enter space when `Input` is inside `AccordionItem`

Open wolkyura opened this issue 3 years ago • 12 comments

NextUI Version

2.0.19

Describe the bug

  1. If the accordion is open by default, it's not possible to focus Input on the first click.
  2. It's not possible to enter space in an Input that is nested within the content of AccordionItem.

Your Example Website or App

https://codesandbox.io/p/sandbox/proud-bird-38k5c2

Steps to Reproduce the Bug or Issue

  1. Open codesandbox link
  2. Click on the input field inside the accordion
  3. See that the first click doesn't focus the input
  4. Click on the input field a second time
  5. Try typing any characters followed by a space and see that it's not possible to enter a space

Expected behavior

I expect regular behavior using Input inside AccordionItem

Screenshots or Videos

https://github.com/nextui-org/nextui/assets/54850073/71af5322-5df7-4c13-ae25-28ce0d6c6516

Operating System Version

macOS 12.3.1

Browser

Chrome

wolkyura avatar Aug 15 '23 14:08 wolkyura

My team is having a similar problem. I will update you if a solution is found.

austinedger0811 avatar Aug 16 '23 17:08 austinedger0811

This problem is not occurring in Safari. It is probably a browser-based bug.

sohamsen15 avatar Aug 16 '23 17:08 sohamsen15

I have reproduced this problem in Safari.

austinedger0811 avatar Aug 16 '23 17:08 austinedger0811

same issue, but entering space works after you click outside the input field and start writing again (sometimes it may not work the first time)

I initially thought it was a problem with my OS or browser, but rebooting the PC had no effect on the problem, however a type of "solution" was written above

unqxl avatar Aug 16 '23 18:08 unqxl

Hey guys this is an Accordion bug, we'll look into it, the Space bar event to open the AccordionItem might be causing this

jrgarciadev avatar Aug 16 '23 19:08 jrgarciadev

is there any updates about that?

unqxl avatar Aug 22 '23 13:08 unqxl

I have the same issue with this bug, using Input inside Accordion component, my team needs some feedback asap.

bstivenprz avatar Aug 24 '23 02:08 bstivenprz

This happens with Textarea as well: https://github.com/nextui-org/nextui/issues/1608

samosaboy avatar Sep 11 '23 20:09 samosaboy

Fixed, install the latest version v2.1.13

jrgarciadev avatar Sep 16 '23 21:09 jrgarciadev

Same thing is happening using Input or TextArea inside Table component

domenico-ruggiano avatar Nov 09 '23 23:11 domenico-ruggiano

The problem with the accordion happens to me with control or any other kind of keyboard input. How can i disable the "Keyboard focus management"

JosePadilla98 avatar Feb 09 '24 15:02 JosePadilla98

This bug is now reprodusing in 2.6.14 Solution for this bug currently is adding e.stopPropagation(); to onFocus event on Input

umtale avatar Feb 14 '25 13:02 umtale