Every line of 'css disable selection' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
49 function disableSelect(chkbox) { 50 var sibling = chkbox; 51 while (sibling != null) { 52 if (sibling.nodeType == 1 && sibling.tagName.toLowerCase() == "select") { 53 $(sibling).prop('disabled', !chkbox.checked); 54 } 55 sibling = sibling.previousSibling; 56 } 57 }
Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code
23 export function removeUserSelectStyles(doc) { 24 try { 25 if (doc && doc.body) removeClassName(doc.body, 'react-draggable-transparent-selection'); 26 if (doc.selection) { 27 doc.selection.empty(); 28 } else { 29 window.getSelection().removeAllRanges(); // remove selection caused by scroll 30 } 31 } catch (e) { 32 // probably IE 33 } 34 }