Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Mobile: Focus search input after tapping the search button

Home / Forums / Virtue Theme / Mobile: Focus search input after tapping the search button

This topic is: Not a support question
[Not a support question]
Posted in: Virtue Theme
February 2, 2020 at 11:04 am

If I am on the Desktop version of my website and click on the top right Search button then the search popup opens and **the input is focused**.

However, if doing the same on the Tablet/Mobile mode of the website, the opened popup is not focused. Instead the user also needs to tap/touch into the search input.

I think the desktop search “widget” is a slightly different implementation then the tablet/mobile one. Would be great if the tablet/mobile search widget would also focus the search input once opened (especially since on mobile it is difficult to see what is focussed and if focus is correct then the keyboard would open automatically).

I guess there’s a callback function that could be the opening function that gets executed once the show animation is done with something like

jQuery(“.theSearchButton”).show({
finishedShowAnimationCallback: function() {jquery(this).focus()
})
something like this I guess 😉

  • The forum ‘Virtue Theme’ is closed to new topics and replies.