0

How to set focus at the end of a span element,that content editable set true and it contains other span tags and normal text.

I was used range object option(rangeObj.setStart (textNode, 1);rangeObj.setEnd (textNode, 2);) but it shows error.

MUHASIN BABU
  • 313
  • 3
  • 9
  • What error does it throw ? Also look at https://stackoverflow.com/questions/511088/use-javascript-to-place-cursor-at-end-of-text-in-text-input-element – Pirate X Mar 23 '18 at 06:51
  • **Uncaught TypeError: Failed to execute 'setStart' on 'Range': parameter 1 is not of type 'Node'. at :1:7** i got this error @PirateX – MUHASIN BABU Mar 27 '18 at 06:37

0 Answers0