Hi bricks team,
As a feature request it would be great if the “Enable auto focus” option was added to the Toggle element and Toggle offcanvas interaction.
How does this help?
Please see this simple scenario. Suppose clicking on the hamburger menu opens offcanvas and there is a search box in it. For mobile users, after Offcanvas opens, the phone keyboard is also enabled because the “Disable auto focus” option is disabled in the offcanvas element. This will definitely not be pleasant.
But when the user clicks on the search icon at the bottom of the page, they definitely intend to search, and after the offcanvas opens, it makes sense to activate the mobile keyboard.
Currently, the problem is that we cannot set a state where the mobile keyboard is not activated if the offcanvas is opened with the hamburger menu. But if the user clicks on the search icon at the bottom of the page, the mobile keyboard is activated.
Adding the “Enable auto focus” attribute to the Toggle element and Toggle offcanvas interaction helps us have complete control over the auto focus behavior in different Toggles, and this is really useful.
I hope the explanation was helpful.
Thank you