Skip to content

Commit

Permalink
Do not use -ms-user-select to prevent selection of elements in IE
Browse files Browse the repository at this point in the history
Fixes #17639.
  • Loading branch information
csnover committed May 2, 2014
1 parent 4870048 commit 7ae2a43
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dom.js
Expand Up @@ -124,12 +124,17 @@ define(["./sniff", "./_base/window"],

// Add feature test for user-select CSS property
// (currently known to work in all but IE < 10 and Opera)
// TODO: The user-select CSS property as of May 2014 is no longer part of
// any CSS specification. In IE, -ms-user-select does not do the same thing
// as the unselectable attribute on elements; namely, dijit Editor buttons
// do not properly prevent the content of the editable content frame from
// unblurring. As a result, the -ms- prefixed version is omitted here.
has.add("css-user-select", function(global, doc, element){
// Avoid exception when dom.js is loaded in non-browser environments
if(!element){ return false; }

var style = element.style;
var prefixes = ["Khtml", "O", "ms", "Moz", "Webkit"],
var prefixes = ["Khtml", "O", "Moz", "Webkit"],
i = prefixes.length,
name = "userSelect",
prefix;
Expand Down

0 comments on commit 7ae2a43

Please sign in to comment.