From 898789b9792ea9bbd4dc26b7a62874b6052b0a58 Mon Sep 17 00:00:00 2001 From: Ryan Di Date: Mon, 12 Sep 2022 13:49:22 +0800 Subject: [PATCH] chore: update lib menu click outside callback comment (#5687) --- src/components/LibraryMenu.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/LibraryMenu.tsx b/src/components/LibraryMenu.tsx index c9fc7570..ebd60976 100644 --- a/src/components/LibraryMenu.tsx +++ b/src/components/LibraryMenu.tsx @@ -107,7 +107,8 @@ export const LibraryMenu = ({ ref, useCallback( (event) => { - // If click on the library icon, do nothing. + // If click on the library icon, do nothing so that LibraryButton + // can toggle library menu if ((event.target as Element).closest(".ToolIcon__library")) { return; }