From e17b1785bacd65ec8005f25f93cb2e127da68544 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87etin?= <69278826+cetincakiroglu@users.noreply.github.com> Date: Wed, 29 Nov 2023 13:22:55 +0300 Subject: [PATCH] Fixed #14236 - PanelMenu | Fix focus flicker --- src/app/components/panelmenu/panelmenu.css | 1 + src/app/components/panelmenu/panelmenu.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/components/panelmenu/panelmenu.css b/src/app/components/panelmenu/panelmenu.css index b409dacea47..0ae30e0d0d2 100755 --- a/src/app/components/panelmenu/panelmenu.css +++ b/src/app/components/panelmenu/panelmenu.css @@ -26,6 +26,7 @@ text-decoration: none; position: relative; overflow: hidden; + outline: none; } .p-panelmenu .p-menuitem-text { diff --git a/src/app/components/panelmenu/panelmenu.ts b/src/app/components/panelmenu/panelmenu.ts index f4da5cea99b..0c2ba554ce0 100644 --- a/src/app/components/panelmenu/panelmenu.ts +++ b/src/app/components/panelmenu/panelmenu.ts @@ -43,7 +43,7 @@ import { ObjectUtils, UniqueComponentId } from 'primeng/utils'; [attr.aria-activedescendant]="focusedItemId" [attr.data-pc-section]="'menu'" [attr.aria-hidden]="!parentExpanded" - (focusin)="menuFocus.emit($event)" + (focus)="menuFocus.emit($event)" (focusout)="menuBlur.emit($event)" (keydown)="menuKeyDown.emit($event)" > @@ -485,6 +485,7 @@ export class PanelMenuList implements OnChanges { } onItemToggle(event) { + this.focused = true; const { processedItem, expanded } = event; processedItem.expanded = !processedItem.expanded;