primefaces / primeng

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

Accordion: Keydown handler on accordion prevents default behavior of editable elements such as inputs and textareas #14038

Open televic-education-ruben opened 1 year ago

televic-education-ruben commented 1 year ago

Describe the bug

When I put an input or textarea (or any other editable element) inside an accordion, the keydown event of the input is propagated up and the handler of the accordion changes the accordion focus and prevents the default behavior of the input/textarea/... https://github.com/primefaces/primeng/blob/master/src/app/components/accordion/accordion.ts#L441 Maybe check the target of the event and not do this when it's an editable component so that the default editing behavior is not broken? This is probably also the cause of this issue: https://github.com/primefaces/primeng/issues/13488

Environment

Normal environment

Reproducer

No response

Angular version

16

PrimeNG version

16

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

snjak commented 5 months ago

This issue still exists. Angular - 17.3.10, PrimeNG - 17.18.0

colfin-96 commented 5 months ago

We are also facing this issue with the Quill editor. We are not using p-editor due to other reasons, so I'm not sure if it works with that. We are using ngx-quill, however, this issue doesn't seem to be limited to just that editor. If I can provide any more information, please let me know.

Versions we use: @angular: 17.3.9 primeng: 17.18.0 ngx-quill: 25.3.2 quill: 2.0.0