From caf639193b82e8acb6cf6462ae11367d8fed335c Mon Sep 17 00:00:00 2001 From: Rob Gardiner Date: Fri, 10 May 2024 11:26:12 +0100 Subject: [PATCH 1/3] non-selectable nodes have no focus ring when clicked --- src/app/components/tree/tree.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/components/tree/tree.ts b/src/app/components/tree/tree.ts index 8a69c548c94..4c07d023474 100755 --- a/src/app/components/tree/tree.ts +++ b/src/app/components/tree/tree.ts @@ -1248,7 +1248,10 @@ export class Tree implements OnInit, AfterContentInit, OnChanges, OnDestroy, Blo return; } else if (this.selectionMode) { if (node.selectable === false) { + node.style = '--p-focus-ring-color: none;'; return; + } else { + node.style = '--p-focus-ring-color: var(--primary-color)'; } if (this.hasFilteredNodes()) { From 136673a43314457cf46695827619dee635457f93 Mon Sep 17 00:00:00 2001 From: Rob Gardiner Date: Fri, 10 May 2024 11:27:17 +0100 Subject: [PATCH 2/3] Revert "non-selectable nodes have no focus ring when clicked" This reverts commit caf639193b82e8acb6cf6462ae11367d8fed335c. --- src/app/components/tree/tree.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/app/components/tree/tree.ts b/src/app/components/tree/tree.ts index 4c07d023474..8a69c548c94 100755 --- a/src/app/components/tree/tree.ts +++ b/src/app/components/tree/tree.ts @@ -1248,10 +1248,7 @@ export class Tree implements OnInit, AfterContentInit, OnChanges, OnDestroy, Blo return; } else if (this.selectionMode) { if (node.selectable === false) { - node.style = '--p-focus-ring-color: none;'; return; - } else { - node.style = '--p-focus-ring-color: var(--primary-color)'; } if (this.hasFilteredNodes()) { From da1a7e567ece84ce3f6778d032d4d52612d0edac Mon Sep 17 00:00:00 2001 From: Rob Gardiner Date: Fri, 10 May 2024 11:28:51 +0100 Subject: [PATCH 3/3] non-selectable tree nodes have no focus ring when clicked --- src/app/components/tree/tree.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/components/tree/tree.ts b/src/app/components/tree/tree.ts index 8a69c548c94..4c07d023474 100755 --- a/src/app/components/tree/tree.ts +++ b/src/app/components/tree/tree.ts @@ -1248,7 +1248,10 @@ export class Tree implements OnInit, AfterContentInit, OnChanges, OnDestroy, Blo return; } else if (this.selectionMode) { if (node.selectable === false) { + node.style = '--p-focus-ring-color: none;'; return; + } else { + node.style = '--p-focus-ring-color: var(--primary-color)'; } if (this.hasFilteredNodes()) {