Skip to content

Commit

Permalink
Fixed primefaces#14236 - PanelMenu | Fix focus flicker
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Nov 29, 2023
1 parent fda0d50 commit e17b178
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/app/components/panelmenu/panelmenu.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
text-decoration: none;
position: relative;
overflow: hidden;
outline: none;
}

.p-panelmenu .p-menuitem-text {
Expand Down
3 changes: 2 additions & 1 deletion src/app/components/panelmenu/panelmenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
>
Expand Down Expand Up @@ -485,6 +485,7 @@ export class PanelMenuList implements OnChanges {
}

onItemToggle(event) {
this.focused = true;
const { processedItem, expanded } = event;
processedItem.expanded = !processedItem.expanded;

Expand Down

0 comments on commit e17b178

Please sign in to comment.