kbar
kbar copied to clipboard
Pass event to perform() as a second argument
To allow this use-case
perform: function (actionImpl, ev) {
if (ev.ctrlKey || ev.metaKey) {
window.open(url, `_blank`)
return false // tell kbar not to hide
} else {
window.location.href = url
}
To be honest, I'm not totally sure it will work correctly in all supported edge cases, for example with history, as I don't use that feature. So definitely don't merge without proper considerations.
Basically, I needed it for my project, so I've added it to my fork without giving it too much thought and it works fine for me.
If you, and others, would fancy this, I could add tests and docs.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
kbar | ✅ Ready (Inspect) | Visit Preview | Aug 25, 2022 at 9:33PM (UTC) |
Hey! This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.