Fix multiple author card menus opening simultaneously (#2852)
This commit is contained in:
+4
-1
@@ -71,6 +71,10 @@ export class AuthorCardComponent implements OnChanges {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onCardClick(event: MouseEvent): void {
|
onCardClick(event: MouseEvent): void {
|
||||||
|
const target = event.target as HTMLElement;
|
||||||
|
if (target.closest('.menu-button-container')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (event.ctrlKey || event.metaKey) {
|
if (event.ctrlKey || event.metaKey) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
@@ -103,7 +107,6 @@ export class AuthorCardComponent implements OnChanges {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMenuToggle(event: Event, menu: TieredMenu): void {
|
onMenuToggle(event: Event, menu: TieredMenu): void {
|
||||||
event.stopPropagation();
|
|
||||||
if (!this.menuInitialized) {
|
if (!this.menuInitialized) {
|
||||||
this.menuInitialized = true;
|
this.menuInitialized = true;
|
||||||
this.initMenu();
|
this.initMenu();
|
||||||
|
|||||||
Reference in New Issue
Block a user