components icon indicating copy to clipboard operation
components copied to clipboard

Space and New line key not working in a textarea used inside a mat-tree

Open aujlambkar opened this issue 1 year ago • 0 comments

Which @angular/* package(s) are the source of the bug?

Don't known / other

Is this a regression?

Yes

Description

If a <textarea> is used inside a <mat-tree>, then any space or newline key inputs to the textarea are ignored

This issue has been occurring since the time the angular version was upgraded to 18.2.26 The issue didn't exist before that

Directions to reproduce the issue

Attached a link where you can reproduce the issue The textarea inside the mat tree exhibits the problem (try typing in some data with spaces and newlines) The text area which is out side the mat-tree works well with spaces and newline inputs

Workaround:-

The only workaround we could think for currently is to stop propagating the keydown event on textarea which prevents the problem currently

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/ctwk44-nkcxdo?file=src%2Fexample%2Ftree-dynamic-example.html

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 18.2.7 Node: 22.4.1 Package Manager: npm 10.8.1 OS: darwin arm64

Angular: 18.2.7 ... animations, cdk, cli, common, compiler-cli, core, forms ... language-service, localize, material, platform-browser ... platform-browser-dynamic, router, service-worker

Package Version

@angular-devkit/architect 0.1802.7 @angular-devkit/build-angular 18.2.7 @angular-devkit/core 18.2.7 @angular-devkit/schematics 18.2.7 @schematics/angular 18.2.7 typescript 5.5.4

Anything else?

No response

aujlambkar avatar Oct 04 '24 11:10 aujlambkar