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
When attempting to rename a collection, the input field does not automatically focus, leading to a slight inconvenience in the user experience.
Expected Behavior
Upon pressing the rename button, the input field should autofocus, similar to the behavior observed when renaming a sketch
Steps to reproduce:
Navigate to a collections page.
Select the rename option from the dropdown of any collection.
(You have to manually click on the input field or click on the rename option again to focus.)
The text was updated successfully, but these errors were encountered:
Ha - I removed the tag "Bug" because I was thinking that this was more of an enhancement. But then I looked at your PR and I see that we already have code which is supposed to handle the autofocus. It doesn't work so I guess it is a bug after all 🙃
It seems like the
if (renameInput.current) {
renameInput.current.focus();
}
is getting called too early - before the input is mounted and therefore it doesn't do anything. One fix might be to wrap that part in a setTimeout with a 0 ms delay, such that it gets executed on the next render.
Actual Behavior
When attempting to rename a collection, the input field does not automatically focus, leading to a slight inconvenience in the user experience.
Expected Behavior
Upon pressing the rename button, the input field should autofocus, similar to the behavior observed when renaming a sketch
Steps to reproduce:
(You have to manually click on the input field or click on the rename option again to focus.)
The text was updated successfully, but these errors were encountered: