Possible Duplicate:
Can I keep Google from stealing my cursor? (Firefox)

It really annoys me when sites like msn.com try to force your cursor to their search box.

I have msn.com as my home page since I like the content. But sometimes I'm just not that interested in looking around the site and want to go to my URL bar straight away and start typing an address.

It is so annoying that as I try to type in an address half of it ends up in the search box.

I am using Firefox, so is there a plugin that I can use? I not sure but could that Greasemonkey do it?

link|improve this question

72% accept rate
Sounds like the same problem solved here: superuser.com/questions/28481/… – random Jan 17 '10 at 2:52
feedback

closed as exact duplicate by random, Troggy, alex, Diago Jan 17 '10 at 8:55

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ for guidance on how to improve it.

2 Answers

up vote 2 down vote accepted

It's using javascript .focus(). Probably something along these lines;

<script type="text/javascript">
   function formfocus() {
      document.getElementById('element').focus();
   }
   window.onload = formfocus;
</script>

Disabling javascript prevented this. (Tested on Firefox using NoScript plugin)

link|improve this answer
feedback

Sorry, but you can't really prevent this from happening, until websites start using the HTML5 autofocus attribute. Once they start doing this, you should be able to tweak a setting in your web browser to disable it.

link|improve this answer
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.