I have various pages where I have implemented the focus method on the first text field (tried $w.onReady as well as the text field viewportEnter events). When loading these pages first time it works, but whenever the pages load via a link from another page, the field loses focus after a second or so. Does anyone have a fix for this?
Now go to https://astutesystems.wixsite.com/testsite and click on the ‘Register’ button which is a simple link to the first page. It focuses correctly for about a second and then loses focus… highlighting the field in red because it’s set to mandatory:
My only solution so far is to do the focus on a setTimeout of about two seconds but that really isn’t a sensible option. If anyone has an alternative fix for this I’d like to hear about it!
I am having a seemingly similar issue where .focus(); doesn’t seem to work on ANY input field, whether loaded at the start via .onReady(); or within a function. It seems the entire .focus(); call is just broken. Any update on the ticket that was submitted 10+ months ago? It IS an accessibility feature, after all!