From ec6f39ddd40ca88e313571682b8c0ee022259bdd Mon Sep 17 00:00:00 2001 From: Halo Dev Bot <87291978+halo-dev-bot@users.noreply.github.com> Date: Wed, 14 Dec 2022 15:14:55 +0800 Subject: [PATCH] [release-2.0] fix: the global search keyboard event is not removed when the component is unmounted (#772) This is an automated cherry-pick of #767 /assign JohnNiang ```release-note None ``` --- src/layouts/BasicLayout.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layouts/BasicLayout.vue b/src/layouts/BasicLayout.vue index c60e3401d..45a204c5f 100644 --- a/src/layouts/BasicLayout.vue +++ b/src/layouts/BasicLayout.vue @@ -81,7 +81,7 @@ onMounted(() => { }); onUnmounted(() => { - document.addEventListener("keydown", handleGlobalSearchKeybinding); + document.removeEventListener("keydown", handleGlobalSearchKeybinding); }); // Generate menus by routes