How to keep Global Search Icon always expanded position rather than after clicking .

Nithin12
Tera Expert

Hi Team,

How to keep Global Search Icon always expanded position rather than after clicking .

Recently we have upgraded to Helsinki, where global search icon is always closed , after clicking the magnifying glass it expands and alows to write, Is there any way to keep always open so that directly we can add context.

Before click

find_real_file.png

After Click.

find_real_file.png

rather than click i wanted allays this to be like open position only is there any property I need to enabled or disabled..?

Thanks,

Nithin.

PlatformDeveloper CommunityChampion EnablementBlogs

1 ACCEPTED SOLUTION

Looks like ServiceNow wants to add and remove that class name at will.   In order to achieve this you need to set inline styles to override the class setting.   Not quite as elegant, but it will give you the desired effect.   Try this.   It's similar to the link that oharel linked to above; just consolidated a bit.



addLoadEvent( function() {


  top.$j('#sysparm_search').css({'width': '150px', 'opacity': '1', 'border': '1px solid #ddd'});


});


View solution in original post

6 REPLIES 6

oharel
Kilo Sage

Hi Nitin,



See this:



Geneva UI16 - enable search box functionality without having to click search icon in banner first?



harel


Please mark as correct or helpful based on impact


Mark Stanger
Giga Sage

Global UI script with the following script should work.



addLoadEvent( function() {


  top.$j('#sysparm_search').addClass('focus');


});


Awesome , Mark.


Hi Mark,



Thanks for your response, The solution what you have provided is working with one issue.



Here when ever from is loading search is in expanded state. But the issue is when ever I click inside search icon and come back to any other place(moving mouse pointer to some other location) or clicking some other thing , search icon goes to closed position.



This only happens when ever there is no data (search text) inside search icon. Is there any way to keep search icon always open.




Thanks,


Nithin.