From 356ad469b33ca75f8a6eb72b9c19f143519be0ff Mon Sep 17 00:00:00 2001 From: ANTONA09 Date: Thu, 18 Jul 2024 12:06:37 +0530 Subject: [PATCH] fix: #16055, Tree: inputText in Template mode does not respond to a space key --- src/app/components/tree/tree.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/app/components/tree/tree.ts b/src/app/components/tree/tree.ts index 688e0fdcd39..31f2b5a703a 100755 --- a/src/app/components/tree/tree.ts +++ b/src/app/components/tree/tree.ts @@ -566,10 +566,18 @@ export class UITreeNode implements OnInit { //enter case 'Enter': - case 'Space': case 'NumpadEnter': this.onEnter(event); break; + + //space + case 'Space': + const nodeName = event.target instanceof HTMLElement && event.target.nodeName; + if (!['INPUT'].includes(nodeName)) { + this.onEnter(event); + } + break; + //tab case 'Tab': this.setAllNodesTabIndexes();