demos/Collage/fabric.js
function makeElementUnselectable(element) {
      if (typeof element.onselectstart !== 'undefined') {
        element.onselectstart = fabric.util.falseFunction;
      }
      if (selectProp) {
        element.style[selectProp] = 'none';
      }
      else if (typeof element.unselectable == 'string') {
        element.unselectable = 'on';
      }
      return element;
    }
function makeElementUnselectable(element) {
      if (typeof element.onselectstart !== 'undefined') {
        element.onselectstart = fabric.util.falseFunction;
      }
      if (selectProp) {
        element.style[selectProp] = 'none';
      }
      else if (typeof element.unselectable == 'string') {
        element.unselectable = 'on';
      }
      return element;
    }
function makeElementUnselectable ( element ) { if ( typeof element . onselectstart !== 'undefined' ) { element . onselectstart = fabric . util . falseFunction ; } if ( selectProp ) { element . style [ selectProp ] = 'none' ; } else if ( typeof element . unselectable == 'string' ) { element . unselectable = 'on' ; } return element ; }
Makes element unselectable
@method makeElementUnselectable
@memberOf fabric.util
@param {HTMLElement} element Element to make unselectable
@return {HTMLElement} Element that was passed in
Makes element unselectable