primefaces / primeng

The Most Complete Angular UI Component Library
https://primeng.org
Other
10.31k stars 4.56k forks source link

Component: p-dropdown doesn't detect first click / focus #16405

Open nerg opened 2 weeks ago

nerg commented 2 weeks ago

Describe the bug

When clicking on a p-dropdown component inside a cell of a p-table, the click or focus event is not detected on the first click. It was working on previous primeNg version (tested on 15).

Environment

We are using p-dropown in p-table, the new version 17.18.10 has a breaking change for us. primeNg 17.18.10 Angular 18.2

Reproducer

https://stackblitz.com/edit/np249c?file=src%2Fapp%2Ftable-cell-edit-demo.ts

Angular version

18.2

PrimeNG version

17.18.10

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.16

Browser(s)

Edge 128.0.2739.67

Steps to reproduce the behavior

  1. Click on the dropdown element in the table (first row)
  2. Check the console.log (see nothing happens)
  3. Click a second time on the dropdown element (see the log is present)
  4. Click on any other table element, see the log is working on first click

Expected behavior

The component should detect the click or the focus on the first try (like in previous version, or like the p-input element).

av-code-crafter commented 1 week ago

Any update on this?

We are also having the same issue. Previously(till version 15) we were able to change the selected item by single click on the dropdown (dropdown is inside the p-cellEditor) and typing first letter of the item. It used to tab through different items by just typing the first letter. This behavior is broken now. Need to click twice even to focus the dropdown. And keyboard navigation is broken too.