I forgot that this is one of those cases when the default action cannot be undone in the event. In this case, you can use the CSS approach for Firefox and Chrome:
-moz-user-select: none; -webkit-user-select: none;
And for Opera / IE:
$("#mytable td").prop("unselectable", "on"); // jQuery 1.6+ $("#mytable td").attr("unselectable", "on"); // jQuery 1.5-
If you want the user to still be able to drag and drop, you can work in this solution:
$("#mytable td").bind("dblclick", function () { var $this = $(this); $this.prop("unselectable", "on").css({ "moz-user-select" : "none", "-webkit-user-select" : "none" }); window.setTimeout(function () { var $this = $(this); $this.prop("unselectable", "").css({ "moz-user-select" : "", "-webkit-user-select" : "" }); }, 0); });
source share