Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Neighborhood › No focus in "keep search box"
New Landing › How can we help? › Themeforest Theme Support › Neighborhood › No focus in "keep search box"
- This topic has 16 replies, 5 voices, and was last updated 10 years by Mohammad – SUPPORT.
-
Posted in: Neighborhood
-
June 5, 2014 at 8:24 pm #80505
Hi,
I wanted to have a visible search box WITHOUT an animated effect in the Neighborhood theme. So I found two posts covering it and tried the code mentioned there:
http://support.swiftideas.net/forums/topic/keep-search-box-open/
http://support.swiftideas.net/forums/topic/search-box-placement/The placement and visibility of the box is as I wanted BUT unfortunately the is no focus in the, now, visible search box. I mean that you STILL have to click on the magnifying glass icon first to change the cursor to be able to type the string you are searching for. Do you follow? Please see the pic for more info.
How to solve this and get the I cursor directly in the “visible” search box without clicking on the search icon?
Thanks!
June 6, 2014 at 3:50 pm #80712Hi,
You want by default when we access your website that the search box got the focus on it? That’s it?
Remember that only one object in the page can have a current focus. The input fields by default gain focus only when we press them, although we can programmatically set a focus on a specifix element of the page.Can you also provide us your website url?
Best Regards,
RuiJune 6, 2014 at 6:35 pm #80731Hi Rui,
the thing is that the focus is NOT on when the vistior kicks on the input field BUT first the visitor has to click on the icon to get the focus into the input field.
I think this is because the javascript keeps the behaviour from the “hidden/animated” search field.
And now when the field is visible, thats to your code from here http://support.swiftideas.net/forums/topic/keep-search-box-open/, the focus behaviour has to be also updated.So I wonder how to changed it?
The installation is local ๐
Thanks a lot for great theme and help!
June 9, 2014 at 11:43 am #81101Hi,
Please follow this topic http://support.swiftideas.net/forums/topic/keep-search-box-open/ to change the search box open always.
Thanks ๐
With Best Regards
Swift IdeasJune 9, 2014 at 4:17 pm #81174-> Mohammad โ SUPPOR
Hi Mohammad, thanks for reply but please READ my messages!
I used the code from the mentioned post BUT the code is not working correctly… as I wrote in my previous messages here.Thanks and looking forward answer!
June 9, 2014 at 4:22 pm #81181Hi,
Where did you put this code ? Please go to Admin -> Theme Options -> Custom CSS => Here put given code and update options.Thanks ๐
With Best Regards
Swift IdeasJune 9, 2014 at 4:46 pm #81184Hi,
from style.css from the theme (to speed up the theme, the custom code is added in the end of the style.css)
/* updates starts ======================== */
nav .menu-search ul.sub-menu {
opacity: 1;
}
.menu-search .sub-menu {
top: 0 !important;
background-color:transparent !important;
}
.menu-search ul li form input {
margin: 4px;
}
nav .menu ul.sub-menu li:first-child:before {
border: none;
}
.ajax-search-results {
background: #fff;
}/* updates ends ======================== */
June 9, 2014 at 4:49 pm #81187Hi,
Please provide your website URL always.
ThanksJune 9, 2014 at 5:04 pm #81190This reply has been marked as private.June 9, 2014 at 5:52 pm #81223I think we are having a bit of miscommunication here ๐
So I recap: you managed to have your search field always visible, but upon clicking the text field, you cannot type in it, you need to click the magnifying glass first.
I can verify this problem on your website and will try to find a solution for you!
Stay tuned please!
All the bestJune 9, 2014 at 6:01 pm #81225Open functions.js and look for the line
jQuery('.ajax-search-form input[name=s]').on('keyup', function(e) {
Change keyup to mousedown
keyup basically means that an event is triggered when you release a button on your keyboard, which is the letting go of the mouseclick of the magnifying glass. mousedown should fix it. I did not test it, so please let me know what happens!
June 9, 2014 at 10:14 pm #81289Hi Melanie,
thanks for reply! ๐
I put the javascript in to theme/js/functions.js BUT unfortunately it did not changed the trigger AND also even DEACTIVATED the dynamic search result in the drop down ๐
Please the url from my previous private message (there u can see the search field).Thanks a lot!
June 10, 2014 at 10:00 am #81431Hmmmm sorry about that, I will forward it to the developer then, I’m sure he knows where the code is hiding!
June 10, 2014 at 10:43 am #81444Ok, thanks, I wait ๐
June 11, 2014 at 1:33 am #81623Hi there,
This is the code you need:
#main-nav .header-right ul.menu > li.menu-search ul.sub-menu { z-index: 9999; top: 0; pointer-events: all; }
Hope that helps!
– Ed
-
Posted in: Neighborhood
You must be logged in and have valid license to reply to this topic.