Page 1 of 1

Firefox: Stop Websites From Stealing Cursor?

Posted: Tue Jun 26, 2012 2:09 pm
by The Egg
This has been a source of frustration and annoyance for some time. I load up a page and start typing somewhere, and the damn website steals my cursor and puts it somewhere else. I've even gone so far as to make my start page about:blank, because most common home pages will steal the cursor while I'm attempting to type in a URL.

Does anyone know how to completely prevent all cursor stealing in Firefox?

Re: Firefox: Stop Websites From Stealing Cursor?

Posted: Tue Jun 26, 2012 2:25 pm
by steelcity_ballin
I don't think FF is your problem - more likely an extension you may have installed or the site's javascript is causing the form field(s) to grab focus. An easy shortcut to get the cursor into the address bar while highlighting all of it is alt+d. This works in every browser as well as windows explorer. Alternatively if you wanted to try it, you could disable javascript but I have a feeling that solution will cause frustration on other pages.

Re: Firefox: Stop Websites From Stealing Cursor?

Posted: Tue Jun 26, 2012 2:26 pm
by nerdrage
I believe that disabling Javascript will prevent this from happening. The problem is likely that you are typing into a box on the page, but the website hasn't completely finished loading. At some point in time, the Javascript code is loaded and executes and calls the "focus()" method on a different text box than the one you are typing in. Anger ensues. :evil:

As a workaround, I've made a conscious effort to not type anything into a page until it has completely finished loading.

EDIT: http://superuser.com/questions/96708/st ... search-box

Re: Firefox: Stop Websites From Stealing Cursor?

Posted: Tue Jun 26, 2012 3:13 pm
by The Egg
nerdrage wrote:
I believe that disabling Javascript will prevent this from happening. The problem is likely that you are typing into a box on the page, but the website hasn't completely finished loading. At some point in time, the Javascript code is loaded and executes and calls the "focus()" method on a different text box than the one you are typing in. Anger ensues. :evil:

As a workaround, I've made a conscious effort to not type anything into a page until it has completely finished loading.

EDIT: http://superuser.com/questions/96708/st ... search-box

Yeah, I'm sure that's what's happening as well, and I've almost thrown objects across the room on several occasions. I do run NoScript, but this typically happens with sites which are whitelisted and I'll need their functionality at some point. It's particularly infuriating when you have just opened a new browser and started typing a URL, only to have the start page grab the cursor halfway through. Like I said, I've resorted to opening with "about:blank", but this is still a major annoyance at other times as well.

I can't think of a single instance where cursor stealing would be desirable. I was hoping there was some little-known way to just kill that ability altogether.

Re: Firefox: Stop Websites From Stealing Cursor?

Posted: Tue Jun 26, 2012 3:23 pm
by BobbinThreadbare
This seems like it would be easy to do with grease monkey, just ignore the focus() method.

Re: Firefox: Stop Websites From Stealing Cursor?

Posted: Tue Jun 26, 2012 5:00 pm
by Flying Fox
That bug has been around since FF2.

Re: Firefox: Stop Websites From Stealing Cursor?

Posted: Tue Jun 26, 2012 7:42 pm
by Washer
Flying Fox wrote:
That bug has been around since FF2.


Hard to call it a bug when every other browser does this as well. What browser in stock form can you visit say Google on and not have your cursor captured?

Re: Firefox: Stop Websites From Stealing Cursor?

Posted: Wed Jun 27, 2012 4:34 am
by Flying Fox
Washer wrote:
Flying Fox wrote:
That bug has been around since FF2.


Hard to call it a bug when every other browser does this as well. What browser in stock form can you visit say Google on and not have your cursor captured?

Not when it is cross-tab.

Re: Firefox: Stop Websites From Stealing Cursor?

Posted: Fri Jun 29, 2012 7:07 am
by The Egg
So basically, there's no solution to this except maybe try Grease Monkey?