primeng icon indicating copy to clipboard operation
primeng copied to clipboard

OrderList: Unable to insert space into input component

Open spahicharis opened this issue 1 year ago • 1 comments

Describe the bug

While using input element inside p-orderList component one is not able to insert space into it. Here is the screenshot example:

image

image

Environment

Issue is easily reproducible on latest primeng version 17.14.1.

Reproducer

No response

Angular version

17.0.8

PrimeNG version

17.14.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.16.1

Browser(s)

No response

Steps to reproduce the behavior

Prerequisites Have installed Angular app and setup primeng components Import p-orderList component

Steps to reproduce

  1. Edit p-orderList template (pTemplate="item")
  2. Put basic input field in pTemplate
  3. Run app using command ng serve
  4. Try to put space into input field

Expected behavior

I should be able to insert space into input.

spahicharis avatar Apr 21 '24 04:04 spahicharis

The default behaviour of a OrderListItem on space is to select/unselect the item. We faced the same issue and resolved it by adding an (keydown.space)="$event.stopPropagation()" EventListener to the input. Hope this helps.

mjlux avatar May 05 '24 06:05 mjlux