Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Commit

Permalink
fix: the global search keyboard event is not removed when the compone…
Browse files Browse the repository at this point in the history
…nt is unmounted (#767)

#### What type of PR is this?
/kind bug

#### What this PR does / why we need it:


![image](https://user-images.githubusercontent.com/88016243/207133131-aa2404b1-c9d3-49fc-a1a7-949dd557e30c.png)

#### Which issue(s) this PR fixes:

Fixes halo-dev/halo#2927

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?

```release-note
None
```
  • Loading branch information
wzrove authored Dec 13, 2022
1 parent 7e0daae commit f3ef88e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/layouts/BasicLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ onMounted(() => {
});
onUnmounted(() => {
document.addEventListener("keydown", handleGlobalSearchKeybinding);
document.removeEventListener("keydown", handleGlobalSearchKeybinding);
});
// Generate menus by routes
Expand Down

1 comment on commit f3ef88e

@vercel
Copy link

@vercel vercel bot commented on f3ef88e Dec 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ui – ./

halo-admin-ui.vercel.app
ui-git-main-halo-dev.vercel.app
ui-halo-dev.vercel.app

Please sign in to comment.