này làm việc cho tôi
Như đề nghị đưa các phong cách css trong
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;
}
cũng thêm những cho phép lựa chọn trong lĩnh vực hình thức
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;
}
Lưu ý rằng không cần các thứ -moz-none hoặc có thể bật lại cho đầu vào không hoạt động.
cho IE tôi thêm
<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>
này không chỉ ngăn cản lựa chọn các nền văn bản nhưng cho phép lựa chọn trên inputfields và và yếu tố bạn đặt các lớp userseleton trên.
Đủ tốt cho tôi! Cảm ơn :) – CompanyDroneFromSector7G
Tại sao bạn thêm -webkit-touch-callout: none ;? –