You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a pretty specific configuration of libraries and I have noticed this odd behaviour. I am not sure how to narrow it down so I can submit a bug to a specific library.
Click the button again - it opens the popover with the command
Click the button again - it opens the popover with the command from now on
On a freshly refreshed page (initial mount), the popover opens and immediately triggers its own close. But after that initial glitch, it works fine.
I initially thought, there was an issue with the popover, but it only happens when <Command.Input /> has an autoFocus prop.
If you remove the autoFocus prop, then it opens fine.
If you replace the <Command.Input /> with any other input with an autoFocus, then it opens fine
What's even more odd is that this behaviour is only happening in Chrome and Brave but not Firefox or Safari 🫠.
I can't see anything in the implementation of <Command.Input /> that could be related. Unfortunately, I can't replace it wholesale due to its usage of non-exported hooks and the props it sets internally cannot be overridden either so I am stuck with trying to make it work.
Anyone got any ideas, hints, etc. to narrow down what's causing this?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a pretty specific configuration of libraries and I have noticed this odd behaviour. I am not sure how to narrow it down so I can submit a bug to a specific library.
Here is an example: https://stackblitz.com/edit/vitejs-vite-8hffmrx5?file=src%2FApp.tsx
To replicate (in Chrome or Brave browsers only):
On a freshly refreshed page (initial mount), the popover opens and immediately triggers its own close. But after that initial glitch, it works fine.
I initially thought, there was an issue with the popover, but it only happens when
<Command.Input />
has anautoFocus
prop.autoFocus
prop, then it opens fine.<Command.Input />
with any other input with anautoFocus
, then it opens fineWhat's even more odd is that this behaviour is only happening in Chrome and Brave but not Firefox or Safari 🫠.
I can't see anything in the implementation of
<Command.Input />
that could be related. Unfortunately, I can't replace it wholesale due to its usage of non-exported hooks and the props it sets internally cannot be overridden either so I am stuck with trying to make it work.Anyone got any ideas, hints, etc. to narrow down what's causing this?
Beta Was this translation helpful? Give feedback.
All reactions