javascript - -webkit-user-select:none and -ms-user-select:none copying the content -


i trying disable selection of <td>s of table having specific class. in css file class added

-webkit-user-select: none;   -ms-user-select: none;       

but neither of them seems work. visually appears <td>s not getting selected. if copy , paste data, content cells getting copied. browser version - ie 11 , chrome 43.0.2357.132 m

adding -moz-user-select: none; works perfect firefox. idea why not working rest 2 browsers?

to make sure line numbers aren't being copied, can use standard <ol> tag:

<ol>     <li>can't select line number</li> </ol> 

to style it, create a counter along ::before make not selectable. can use element (not <ol>) method.

demo additional styling: http://jsfiddle.net/derekl/ae2fggl5/

enter image description here
(chrome) line numbers appear selected, can't copy them or select them individually.

enter image description here
(firefox) line numbers can't selected in firefox.


Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -