Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(defineShortcuts): use useEventListener #150

Merged
merged 1 commit into from
May 4, 2023
Merged

Conversation

smarroufin
Copy link
Collaborator

Fix defineShortcuts by using useEventListener instead of document.addEventListener.

In case where we had focus in an iframe or Monaco editor (Nuxt Studio usages), events were not caught. Using useEventListener falls back on the window.

@vercel
Copy link

vercel bot commented May 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
ui ✅ Ready (Inspect) Visit Preview May 4, 2023 8:48am

@smarroufin smarroufin requested a review from benjamincanac May 4, 2023 08:49
@benjamincanac benjamincanac merged commit 59f62d3 into dev May 4, 2023
@benjamincanac benjamincanac deleted the fix/shortcuts branch May 4, 2023 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants