Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove weird border when ctrl click td in firefox

Tags:

css

firefox

When I ctrl+ click on a td, that td will have weird border. It only occur in firefox. Would some one help me with it? Thank you very much.

Here is the live demo http://jsbin.com/banofehisu/edit?html,css,js,output

Just press control and click on the td you'll see it.

like image 700
Hiep_Ho Avatar asked Aug 18 '15 10:08

Hiep_Ho


1 Answers

Add this line:

*{
  -moz-user-select: none;
}

Or, you may just apply this rule in table.

As per @tushar comment, if you want your text still be selected then you may use jquery like this:

$('table').on('mousedown', function(e) {
    if (e.ctrlKey) {
        e.preventDefault();
    }
});
like image 154
Bhojendra Rauniyar Avatar answered Nov 15 '22 05:11

Bhojendra Rauniyar