Put cursor at end of cell text and not highlight/select cell text?

edited January 13 in Technical questions

I have a scenario where I need the editor of a cell to be opened with the cursor at the end of the text within the cell and not highlight the text.

For example, if my user opens the editor of a cell containing the text 'ID', they should be able to just start typing once they enter editor and it would append the text they enter after 'ID'
Essentially, it would be like going into editor for a cell that has data in it (which highlights/selects the text) and clicking the right arrow key (moves cursor to end of text)

Snippet: https://snippet.webix.com/dybjkyqn

How would I go about this? Any help would be greatly appreciated.



  • try this

        onAfterEditStart: function(){
          var node = this.getEditor().getInputNode();
          node.selectionStart = node.selectionEnd = node.value.length;
  • @integral worked perfect!! Thank you so much

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!