Hi,
It is often desirable to programmatically focus a form fields (s-text-field and so on…). Right now, calling the focus method on those components don’t do anything. It would be nice if all form components shadow dom would be set to delegateFocus to true ( ShadowRoot: delegatesFocus property - Web APIs | MDN ).
The use case: I’m trying to replicate this piece of UI:
Whenever I click on Enter I’d like to create a new field, and focus it.
1 Like
Thanks! I’ll let you know when there’s an update here.
1 Like
I believe this has been released if you’re using the new polaris.js file from the CDN. Let me know if that’s not accurate though.
Hello @Anthony_Frehner ,
Just a qucik follow up to let you know this is not working. All form fields are still not focusable (at least in React 19).
1 Like
Still not working for me as of now. React 18.2
Please reproduce the error in a codesandbox or something. I’m able to focus the input using this example in both Chrome and Safari (but not Firefox; I opened a bug for them a while ago here)
1 Like
In my case, I was using Firefox. So will wait for the bug to be resolved. Thanks!