How to disable ctrl + click to select text in IE 10?

In IE 10, when you click on any text while holding down a key CTRL, the browser selects the text (this means the text is getting focus, and I want to avoid it because I have a script with several choices where CTRL+ click means add / remove -selection).

How to disable this "feature"?

By the way, I still want to be able to select text using normal mouse actions.

+5
source share
2 answers

This feature can be disabled by completely disabling the selection.

, -ms-user-select, IE10. (. : http://ie.microsoft.com/testdrive/HTML5/msUserSelect/Default.html)

: , css , :

.notselectable
{
    -ms-user-select: none;
}
+3

IE 8 CTRL SHIFT , :

var obj = document.createElement("DIV");
obj.onselectstart = function(){
  return false;
}

, :

window.onload = function(){
  document.onselectstart = function(){
    return false;
  }
}
+1

All Articles