我有以下html:
1 | one |
2 | two |
3 | three |
相关的CSS:
.unselectable {
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
在Firefox和Chrome中,如果我选择全部(ctrl-a),我期望发生的事情,只选择“一个”,“两个”和“三个”,而不是行号.但是,当我粘贴剪贴板中的内容时,我会得到不同的结果:
Chrome输出:
one
2 two
3 three
Firefox输出:
one
two
three
所以Chrome正在复制除了第一个之外的每个不可选择的行,而firefox正在添加一个额外的行,其中不应该有一行.
目前的Chrome版本为54.0.2840.71 m,当前的firefox版本为49.0.2(两者都可以使用user-select:none;根据http://caniuse.com/#feat=user-select-none
目前有可能解决这个问题吗?
编辑
请注意,我收到的表正在由另一个库呈现,我实际上只能操作这些类.