Remove weird border when ctrl click td in firefox

前端 未结 1 1210
深忆病人
深忆病人 2021-01-18 14:56

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

1条回答
  •  生来不讨喜
    2021-01-18 15:05

    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();
        }
    });
    

    0 讨论(0)
提交回复
热议问题