primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Dropdown with filter emits both focus and blur on focus

Open Dhaneshri opened this issue 9 years ago • 2 comments

Current behavior When dropdown with filter is clicked, both focus and blur events are emitted at the same time. And also, the type of blur event is FocusEvent.

Expected behavior On click of dropdown with filter, only focus event should be emitted. Blur event should be emitted on blur only.

Minimal reproduction of the problem with instructions

  1. Use dropdown with filter and bind focus and blur events <p-dropdown [options]="cars" filter="filter" (onFocus)="onFocusHandler($event)" (onBlur)="onBlurHandler($event)">
  2. Click on the dropdown.
  3. Focus and blur events, both are triggered.

Please tell us about your environment: Operating system: Windows 8.1 Pro, IDE: Visual Studio Code 1.16.1

  • Angular version: 4.3.6

  • PrimeNG version: 4.2.0-rc.1

  • Browser: Google Chrome 61.0.3163.100 (Official Build) (64-bit)

  • Language: TypeScript 2.4

Dhaneshri avatar Oct 10 '17 10:10 Dhaneshri

The problem still occurs in primeng version 7.0.5. It would be great if this could be fixed.

As a workaround for dropdowns with editable=false we currently use the onHide event. This event is emitted when the option panel disappears.

mariusreusch avatar Mar 04 '19 11:03 mariusreusch

Hi,

We couldn't replicate the issue with the latest PrimeNG release, if the issue still exists with the latest PrimeNG version, please provide a StackBlitz example by using PrimeNG Issue Template and re-open the issue.

Regards

cetincakiroglu avatar Mar 28 '22 11:03 cetincakiroglu