Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Next.js bug where Safari scrolls to bottom when closing kbar (#284)
It's possible for the previous active element to be the same as the current activeElement ref when blurring focus to prevent Safari from scrolling down when the kbar is closed. This results in re-focusing the input element. This commit additionally checks that we didn't just blur the input before closing, before re-focusing it.
- Loading branch information
a8f4766
There was a problem hiding this comment.
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:
kbar – ./
kbar-timc.vercel.app
kbar-git-main-timc.vercel.app
kbar.vercel.app