Reputation: 23240
Please, take a look at this code
http://www.jsfiddle.net/tt13/5CxPr/21
On Firefox it shows strange blue border when you select multiple row by pressing ctrl button but on Chrome it doesn't.
Using latest Firefox 10.0.2.
Is that browser related bug?
Upvotes: 8
Views: 5681
Reputation: 2155
This works for current version of Firefox 20.0.1 if you're prepared to add an extra element inside your cell to allow the text to still be selectable.
td { -moz-user-select: -moz-none }
td * { -moz-user-select: text }
Upvotes: 3
Reputation: 66389
This is due to text being selected - native browser behavior.
You can observe the same issue in Chrome as well by using the SHIFT key instead of CTRL.
To overcome this, you can simply clear the selection right after user click the cell to select:
$(".subject").live('click',function(event) {
if(event.ctrlKey) {
$(this).toggleClass('selected');
} else {
$(".subject").removeClass("selected");
$(this).addClass("selected");
}
if (document.selection)
document.selection.empty();
else if (window.getSelection)
window.getSelection().removeAllRanges();
});
Upvotes: 10
Reputation: 30666
Try setting CSS property -moz-user-select
to the table to disable the default selection behavior:
table { -moz-user-select: none; }
Upvotes: 8