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

Dropdown: delete/home/end keys not working as expected in editable mode #5663

Open
xenolithviktor opened this issue Apr 30, 2024 · 0 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@xenolithviktor
Copy link
Contributor

xenolithviktor commented Apr 30, 2024

Describe the bug

When using editable mode with the Dropdown component there are some weirdness while using the delete/home/end keys.

  • Pressing the delete-key on the keyboard does not delete anything. Instead it seems to move the cursor to the start. Preferably, it should delete either the selected characters or the character in front of the cursor.
  • Using home/end keys is a common way to quickly move the cursor to the start or end of the input. The moving itself works, but when combined with the SHIFT-key, nothing is selected.

Reproducer

https://stackblitz.com/edit/primevue-dropdown-editable-key-bug?file=src%2FApp.vue

PrimeVue version

3.52.0

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

Firefox/Edge

Steps to reproduce the behavior

  1. Try deleting some text inside an editable Dropdown using the DEL button on the keyboard
  2. Try selecting text in an editable Dropdown using SHIFT + HOME/END.

Expected behavior

  1. If any text is selected, that text should be deleted. Otherwise the character in front of the cursor should be deleted.
  2. The text should be selected from the cursor to the beginning/end of the input.
@xenolithviktor xenolithviktor added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

1 participant