nextui icon indicating copy to clipboard operation
nextui copied to clipboard

[BUG] - console error inside <Input> when hitting shift key

Open Berdugo1994 opened this issue 1 year ago • 4 comments

NextUI Version

2.2.9

Describe the bug

When hitting shift key inside <Input> component I'm receiving a console error.

VM41982:14 Uncaught TypeError: inputTypes.contains is not a function
    at isTextElement (<anonymous>:14:31)
    at <anonymous>:31:26
    at <anonymous>:66:3

Seems that there is a usage of js builtin: contains method instead of includes

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. Add <Input> component
  2. Hit shift keyboard
  3. Check console

Expected behavior

No error should be happen when hitting shift key.

Screenshots or Videos

image

Operating System Version

macOS 17.3

Browser

Chrome

Berdugo1994 avatar Feb 05 '24 19:02 Berdugo1994

I think this is a problem with react because I get this error even though I use pure input and react.

imhalid avatar Feb 06 '24 03:02 imhalid

Hi @Berdugo1994, I was trying to reproduce this error, however I did not get the result that you explained above. Could you give me more details about how to reproduce this bug?

kuri-sun avatar Feb 09 '24 00:02 kuri-sun

Based on the following dependencies: next 14.1.0 react 18.2.0 nextui-org/react 2.2.9

When using <Input> component and hitting Shift button on keyboard it occurs. image

Berdugo1994 avatar Feb 09 '24 12:02 Berdugo1994

@Berdugo1994 Thank you for the reply. I created my NextJS project for this, however, I could not see the same error. Could you please send me a simple sandbox or provide the reproducing code?

kuri-sun avatar Feb 11 '24 01:02 kuri-sun