Ask Your Question
4

How to prevent cursor's default position being on Search box?

asked 2012-05-13 09:35:28 -0500

zaf gravatar image zaf
554 8 8 26

Kind of stupid question, but it's something really annoying sometimes: Can anyone tell me how can I prevent cursor being on Search Box all the time? In all pages, even in login page where user is going to type his credentials, the cursor is at search box, so in any page, users have to waste a click somewhere in the page, to take focus from search box and then be able to navigate...

I think they are more probable to want to scroll down in a page than type a search.

delete close flag offensive retag edit

Comments

3

Yes, we will fix that, agreed.

Evgeny ( 2012-05-13 10:41:07 -0500 )edit

thanks man for being active :) it's really helpful. So, the cursor thing is not something I can easily change? It requires a lot of updates?

zaf ( 2012-05-13 10:45:58 -0500 )edit

Too bad, did not include this fix into the 0.7.43 release, was preoccupied with other issues, but we'll make another one very shortly. We'll be trying to release features/fixes as soon as they are ready from now on. There's been about a month between .43 and .42.

Evgeny ( 2012-05-14 14:48:57 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-05-14 14:40:41 -0500

alexandros.z gravatar image alexandros.z
610 12 10 30

Probably a hack, but you can add the following

    <script type="text/javascript" charset="utf-8">
       $(document).ready(function() {
            elements = $('.searchInput');
            elements.each(function() {$(this).blur()});  
        });
    </script>

in the pages you want to deactivate the focus in search input. If you want to disable it in all pages, you can add this code in base.html

link publish delete flag offensive edit

Comments

We just need to focus on the input only on some pages, in fact we have special classes set on the body element, that we could use to detect the pages where we need the focus.

Evgeny ( 2012-05-14 14:46:50 -0500 )edit

In a hypothetical scenario, that I would like to remove focus from search input in all pages, what would you suggest?

alexandros.z ( 2012-05-14 14:58:14 -0500 )edit

Then you could apply your solution. By default we'll be focusing the cursor on the most relevant field, but if you would like to override that - just add custom js to the bottom of the pages.

Evgeny ( 2012-05-15 10:48:27 -0500 )edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Reliable Askbot Hosting

Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.

create your Q&A site
30 days free trial

Question tools

Follow
1 follower

subscribe to rss feed

Stats

Asked: 2012-05-13 09:35:28 -0500

Seen: 97 times

Last updated: May 14 '12