यह मेरे लिए काम करता
के रूप में सुझाव
body, div
{
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: -moz-none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}
में सीएसएस शैलियों डाल भी इन जोड़ने के प्रपत्र फ़ील्ड्स के भीतर चयन अनुमति देने के लिए
input, textarea, .userselecton
{
-webkit-touch-callout: text;
-webkit-user-select: text;
-khtml-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
-o-user-select: text;
user-select: text;
}
नोट करें -मोज़-कोई भी आवश्यक नहीं है या इनपुट के लिए पुन: सक्षम नहीं है।
IE के लिए
मैं
<script type="text/javascript">
window.addEvent("domready", function()
{
document.addEvent("selectstart", function(e)
{
if ((e.target.tagName == "INPUT") ||
(e.target.tagName == "TEXTAREA") ||
(e.target.hasClass("userselecton")))
{
return true;
}
return false;
});
});
</script>
यह न केवल पृष्ठभूमि पाठ के चयन से बचाता है लेकिन inputfields पर चयन की अनुमति देता है जोड़ सकते हैं और और तत्व आप पर userseleton वर्ग डाल दिया।
मेरे लिए काफी अच्छा है! धन्यवाद :) – CompanyDroneFromSector7G
आपने क्यों जोड़ा-webkit-touch-callout: none ;? –