Is there a way to make web browser's select all action (Ctrl+A or from contextmenu) select only the text in the focused div, ignoring what is outside?
I.e. if you do a select all in a textarea, it will only select the contents of a textarea. Is there a way to make a non-contenteditable, focusable div to behave in the same way?