nextui icon indicating copy to clipboard operation
nextui copied to clipboard

[BUG] - In the Input component I cannot use cursor to move within text.

Open uigywnkiub opened this issue 1 year ago • 3 comments

NextUI Version

2.4.2

Describe the bug

In the Input component, I cannot use option/command + arrow left/right to move within text.

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. Go inside into any Input component.
  2. Type some text.
  3. Use option/command + arrow left/right to move within text.

Expected behavior

The cursor must move within text with default keys as it has in any other input fields.

Screenshots or Videos

https://github.com/nextui-org/nextui/assets/29861553/e980dff5-0452-4af0-9014-32587cba523c

Operating System Version

  • OS: macOS

Browser

Chrome

uigywnkiub avatar Jun 29 '24 14:06 uigywnkiub

I just tested it on the input storybook and didn't reproduce the issue. Please provide a minimal reproducible environment.

wingkwong avatar Jun 29 '24 14:06 wingkwong

Please provide a minimal reproducible environment.

Oh, looks like bug with input if it inside accordion.

    <Accordion
        isCompact
        hideIndicator
        onExpandedChange={onExpandedChange}
        defaultExpandedKeys={isInitialExpanded}
        className='p-0'
        itemClasses={{
          titleWrapper: 'border-none focus:ring-0 placeholder:text-default-500',
        }}
      >
        <AccordionItem
          key={ACCORDION_ITEM_KEY}
          isCompact
          aria-label={accordionTitle}
          title={accordionTitle}
          classNames={{
            title: 'text-center hover:opacity-hover',
          }}
        >
          <div className='px-2'>
            <Input
              size='lg'
              color='primary'
              isClearable
              placeholder={placeholder}
              onClear={() => [handleSearch(''), setSearchTerm('')]}
              onChange={handleInputChange}
              defaultValue={searchTerm}
              classNames={{
                input: 'border-none focus:ring-0 placeholder:text-default-500',
                inputWrapper: 'h-20 my-2 px-4',
              }}
            />
          </div>
        </AccordionItem>
      </Accordion>

uigywnkiub avatar Jun 29 '24 14:06 uigywnkiub

Related: https://github.com/nextui-org/nextui/issues/2152

ryo-manba avatar Jul 06 '24 02:07 ryo-manba

I previously encountered an issue with text inputs in dropdowns too, which persisted until I updated NextUI. However, it seems that the problem still occurs when the text input is placed inside a table. Could this be a bug, or is there something I might be doing wrong?

ilmakio avatar Aug 08 '24 17:08 ilmakio

I previously encountered an issue with text inputs in dropdowns too, which persisted until I updated NextUI. However, it seems that the problem still occurs when the text input is placed inside a table. Could this be a bug, or is there something I might be doing wrong?

Something strange with library. 15 days ago was last commit...

uigywnkiub avatar Aug 08 '24 19:08 uigywnkiub