Item with: letter cannot be selected

In Chrome (version 55.0.2883.87 m) (win 8.1) the text in element c: the first letter cannot be selected (completely) with a mouse selection.

Does this have a workaround without javascript?

div:first-letter{
  text-transform: capitalize;
}
<div>
unselectable
</div>
Run codeHide result
+4
source share
1 answer

This has been a known bug in Chrome for a while, starting in 2009.

https://bugs.chromium.org/p/chromium/issues/detail?id=17528

A “hacker fix” can be applied using an HTML comment before the text, you still cannot select U (but you can choose n). But copying as a selection will actually give you all the content in a div.

div:first-letter{
  text-transform: capitalize;
}
<div>
<!-- -->unselectable
</div>
Run codeHide result
+1

Source: https://habr.com/ru/post/1665208/


All Articles