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: autoOptionFocus property not working #14655

Closed
miki995 opened this issue Jan 29, 2024 · 3 comments
Closed

Dropdown: autoOptionFocus property not working #14655

miki995 opened this issue Jan 29, 2024 · 3 comments
Assignees
Labels
LTS-16-PORTABLE Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@miki995
Copy link
Contributor

miki995 commented Jan 29, 2024

Describe the bug

Using the most simple example of dropdown, the autoOptionFocus property is not doing it's job.

The problem is present only on first dropdown open, after first open, the focus is gone as it should be.

Environment

Angular 17, Primeng 17

image image

Reproducer

No response

Angular version

17.1.1

PrimeNG version

17.4.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.13

Browser(s)

No response

Steps to reproduce the behavior

  1. Open primeng repo master branch
  2. Go to src/app/showcase/doc/dropdown/basicdoc.ts
  3. Add [autoOptionFocus]="false" to the <p-dropdown component
  4. Compile and check

Expected behavior

The dropdown should not show the focus on first item on first load.

@miki995 miki995 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 29, 2024
@mehmetcetin01140 mehmetcetin01140 self-assigned this Jan 30, 2024
@mehmetcetin01140 mehmetcetin01140 added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jan 30, 2024
@mehmetcetin01140 mehmetcetin01140 added this to the 17.5.0 milestone Jan 30, 2024
@c-o-l-i-n
Copy link
Contributor

@cetincakiroglu @mehmetcetin01140 This is still broken in PrimeNG 17.18.0:

https://stackblitz.com/edit/stackblitz-starters-rytw83?file=src%2Fmain.ts

image

@Ar-Kareem
Copy link

This was supposedly fixed in version (17.5.0 2024-02-01) but I'm still experiencing it in 17.18.11.

It only happens the first time I open the dropdown when loading the page
image

Closing the re-opening the dropdown corrects the behavior (by having no option selected)
image

@mountpoint
Copy link

@cetincakiroglu this issue still exists in version 17.18.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTS-16-PORTABLE Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants