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

cursor position change when using ArrowDown/ArrowUp in n-auto-complete #6795

Open
5 tasks done
lanyeeee opened this issue Mar 6, 2025 · 0 comments · May be fixed by #6796
Open
5 tasks done

cursor position change when using ArrowDown/ArrowUp in n-auto-complete #6795

lanyeeee opened this issue Mar 6, 2025 · 0 comments · May be fixed by #6796
Labels
untriaged need to sort

Comments

@lanyeeee
Copy link

lanyeeee commented Mar 6, 2025

Describe the bug

When using the n-auto-complete component, pressing the keyboard ArrowDown/ArrowUp to navigate through dropdown options causes the cursor position in the input field to unexpectedly change.

For example, if the cursor is initially positioned in the middle of the input text, after pressing ArrowDown, the cursor jumps to the end of the text, disrupting the user's typing experience.

Steps to reproduce

  1. Open any naive-ui auto-complete component example (such as the official website demo)
  2. Enter some text in the auto-complete input field (e.g., test example)
  3. Position the cursor in the middle of the input text (e.g., test| example)
  4. Press ArrowDown or ArrowUp to navigate through dropdown options
  5. Observe the cursor position change

Link to minimal reproduction

https://www.naiveui.com/en-US/os-theme/components/auto-complete

System Info

System:
    OS: Windows 11 10.0.26100
    CPU: (16) x64 AMD Ryzen 7 5800X3D 8-Core Processor
    Memory: 36.77 GB / 63.89 GB
  Binaries:
    Node: 22.13.1 - D:\Program Files\nodejs\node.EXE
    npm: 10.9.2 - D:\Program Files\nodejs\npm.CMD
    pnpm: 9.15.5 - ~\AppData\Roaming\npm\pnpm.CMD
  Browsers:
    Edge: Chromium (132.0.2957.140)
  npmPackages:
    vue: ~3.5.13 => 3.5.13

Used Package Manager

pnpm

Validations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged need to sort
Projects
None yet
1 participant