2

How can I change it so that when I'm focusing on a div with some text, and I press Ctrl/Cmd + A the text inside the div gets selected, without selecting the whole document?

Also: is there a JS/jQuery command to select the text inside a div?

Sumner Evans
  • 8,951
  • 5
  • 30
  • 47
Luis Gallego
  • 315
  • 1
  • 3
  • 11
  • 4
    This is not expected behaviour. When I press Ctrl+A to select all, I expect all to get selected. As a screen reader user this would drive me insane. – James Scholes Apr 19 '14 at 00:47
  • possible duplicate of [JQuery: Selecting Text in an Element (akin to highlighting with your mouse)](http://stackoverflow.com/questions/985272/jquery-selecting-text-in-an-element-akin-to-highlighting-with-your-mouse) – Jackson Apr 19 '14 at 00:47
  • 1
    You can definitely do that, but don't. – Derek 朕會功夫 Apr 19 '14 at 01:10

1 Answers1

-2

You should use textarea + css to get this feature natively!