views:

2930

answers:

6

I'm a web developer focused on UI.

Many interface features in my web application are based on double-clicking.

In IE, this brings up that new annoying "accelerators" icon which interferes with my user interface. Is it possible to disable "accelerators" on my pages? Maybe with some new stupid IE-specific meta tag?

+6  A: 

Although I feel for you (I don't think there is any way to disable them in code) I would advise against using double-click for a lot of your user interface as it goes against the paradigm of the Web.

Many users are told on sites to not double-click to avoid duplicate transactions etc.

The only thing I can really think of as a workaround would be to do some sort of explicit:

.blur();

on the element that triggered the double-click event. I haven't tried this, but I would hope this would make the accelerator icon disappear.

scunliffe
You're being charitable, a web interface that is based on double-clicking is just a big old WTF!
Jim In Texas
A: 

Doubt if you still need this, but for everyone who's annoyed by this accelerator function, go to...

Tools > Internet Options > Advanced

Then uncheck the box for "Display Accelerator button on selection", under "Browsing".

Cheers.

His question isn't how to disable it within his copy of IE8, but how to disable the functionality for other peoples copies of IE8 when they are on his website.
Beska
+1  A: 

You can use Internet Explorer custom Event selectstart with return false to prevent showing that ugly slice icon.

update: I have seen several solutions, which involve something like getElement -> add them event listener. It is not ideal solution. Use bubbling is better. Just register one selectstart on document, it is enough.

+3  A: 

Using JQuery:

$('body').bind('selectstart', function(e) { return $(e.target).is(':input'); });

This will disable selecting page content, except for in input elements.

Andrew Davey
Excellent answer, and just what I was looking for. I had an element with a jQuery click event, and clicking too quickly / moving the mouse when clicking triggered the Accelerator feature. I added the following for my element class:$('div.myelementclass').bind('selectstart', function(e) { return false; });All now working great :)
BrynJ
A: 

Possibly, at the website, we can block Accelerators by adding the attribute oncontextmenu="return false:" into the body element. I'm doubtful that a colon belongs there, and maybe the word "false" is all that's needed for the value. Considering when the advice was rendered, this was for the beta release; I don't know if the IE8 final release has the same disabling method. I don't have IE8 or recent Win, so I can't test it. It might have the effect of blocking all context menus, not just those specific to the website being viewed. See the last post in http://www.utteraccess.com/forums/showflat.php?Cat=&Board=50&Number=1804672&Zf=&Zw=&Zg=0&Zl=a&Main=1804672&Search=true&where=&Zu=140925&Zd=l&Zn=&Zt=15&Zs=b&Zy=#Post1804672&Zp= as accessed 8-20-09.

On whether websites that accept double-clicks are a bad idea: They're okay if visitors are told about them, both visitors who'd want to get the benefit of double-clicking and visitors who need to know not to double-click in order to avoid unwanted effects. Otherwise, I doubt they're good as to usability.

Thanks.

-- Nick

Doesn't work. Adding it to any element still results in the accelerator menu.
Gregory
A: 

In my case, the accelerator thing was popping up when I was tracking mousedown/mousemove/mouseup events. To prevent it, I cleared the document selection on mouseup.

if (document.selection)
    document.selection.clear();
jaydfwtx