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] - In the Input component I cannot use cursor to move within text. #3364

Closed
uigywnkiub opened this issue Jun 29, 2024 · 6 comments · Fixed by #3419
Closed

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

uigywnkiub opened this issue Jun 29, 2024 · 6 comments · Fixed by #3419
Assignees
Labels
🐛 Type: Bug Something isn't working

Comments

@uigywnkiub
Copy link

uigywnkiub commented Jun 29, 2024

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

Screen.Recording.2024-06-29.at.17.24.43.mov

Operating System Version

  • OS: macOS

Browser

Chrome

Copy link

linear bot commented Jun 29, 2024

@wingkwong
Copy link
Member

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

@uigywnkiub
Copy link
Author

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>

@ryo-manba
Copy link
Member

Related: #2152

@ilmakio
Copy link

ilmakio commented Aug 8, 2024

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?

@uigywnkiub
Copy link
Author

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...

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.

5 participants