primefaces / primeng

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

Accordian : TextArea shortcuts are not working when used in Accordian Panels #14368

Closed siddhareddy closed 10 months ago

siddhareddy commented 11 months ago

Describe the bug

When Text Area components are used in a accordion panels and focus is within the text area content, the traditional keyboard shortcuts such for using Shift+Home , Shift+End for highlighting the text and Home, End to move within the text area are not working and moves to next accordion instead. image When focus is within the text area, text-area shortcuts should take precedence These shortcuts work fine when the text area is outside of accordian

Environment

Node : 20

Reproducer

https://stackblitz.com/edit/mwq3yh?file=src%2Fapp%2Fdemo%2Faccordion-basic-demo.html

Angular version

17.0.0

PrimeNG version

17.1.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20

Browser(s)

Chrome 120

Steps to reproduce the behavior

  1. Goto demo-bug
  2. move the cursor to within anywhere inside text area
  3. try shortcut such as shift+end to highlight text till the end of line

Expected behavior

  1. Text Area shortcuts should work when the cursor is inside the textarea and behave similar to the functionality of inputtextarea-demo
siddhareddy commented 11 months ago

Hello @cetincakiroglu and @mehmetcetin01140

While Shift+Home and Shift+End shortcuts are now functional, other essential text area shortcuts (e.g., Home, End, Ctrl+Home, Ctrl+End, Up/Down arrows) remain inoperable when the cursor is within a text area nested within an accordion. This behavior is likely due to conflict with accordion-specific shortcuts.

Notably, the PrimeVue library demonstrates correct functionality for the same component combination primevue-working-demo

Could we have the same behavior in primeng too ? primeng-updated-demo-17.2.0

Shortcut Description Working Status in 17.2.0
Up Arrow Previous line :x:
Down Arrow Next line :x:
Ctrl+Home Beginning of the text :x:
Ctrl+End End of the text :x:
Home Beginning of the line :x:
End End of the line :x:
Ctrl+Right Arrow End of the next word :white_check_mark:
Ctrl+Left Arrow Beginning of the previous word :white_check_mark:
Shift+Home Select text to beginning of current line :white_check_mark:
Shift+End Select text to end of current line :white_check_mark:
Left Arrow Previous character :white_check_mark:
Right Arrow Next character :white_check_mark:
siddhareddy commented 10 months ago

@mehmetcetin01140 and @cetincakiroglu Sorry to be behind the issue, but did you get a chance to take a look at this issue and the above demo ? Its not only affecting the text area but also inputtext field as well when trying to use keyboard shortcuts in an accordian Appreciate if you suggest any workaround or reconsider the issue