nextui icon indicating copy to clipboard operation
nextui copied to clipboard

[BUG] - Not possible to enter space characters into Textarea or Input components

Open nthsense opened this issue 1 year ago • 8 comments

HeroUI Version

2.6.12

Describe the bug

It is impossible to enter space characters into Textarea or Input components. This is true in my local builds as well as on the demo site: https://www.heroui.com/docs/components/textarea

Your Example Website or App

https://www.heroui.com/docs/components/textarea

Steps to Reproduce the Bug or Issue

  1. Go to https://www.heroui.com/docs/components/textarea on a Mac running Sonoma 14.6.1. Use either Chrome or Safari
  2. Go to any of the running Textarea examples and try to enter a space character - it doesn't work.

I have confirmed that the examples on the React-Aria site do work correctly. (https://react-spectrum.adobe.com/react-aria/TextField.html)

Expected behavior

I should be able to enter a space character into a Textarea or Input component.

Screenshots or Videos

No response

Operating System Version

macOS Sonoma 14.6.1

Browser

Chrome

nthsense avatar Jan 16 '25 22:01 nthsense

It seems to be related to a keydown handler. If I remove the top keydown handler in Chrome DevTools, it starts working:

Image

nthsense avatar Jan 16 '25 22:01 nthsense

That last screen capture was from my local build. Here's the one from the running examples:

Image

nthsense avatar Jan 16 '25 22:01 nthsense

Please try updating to 2.6.13 to see if it resolves this issue

Peterl561 avatar Jan 17 '25 03:01 Peterl561

Looks like that fixed it.

nthsense avatar Jan 17 '25 04:01 nthsense

Still reproducible at version 2.7.4 for me. Adding onKeyDown={() => null} to the <Textarea /> fixes the issue.

domhhv avatar Mar 05 '25 17:03 domhhv

@domhhv I just tested on docs but didn't reproduce the issue.

wingkwong avatar Mar 05 '25 17:03 wingkwong

Still reproducible at version 2.7.4 for me. Adding onKeyDown={() => null} to the <Textarea /> fixes the issue.

Thanks @domhhv, worked for me too

StanShade avatar Jul 02 '25 05:07 StanShade