Skip to content
Snippets Groups Projects
Commit 1ae9830b authored by Ahmad Mahmoud's avatar Ahmad Mahmoud Committed by Fady Samir Sadek
Browse files

Fixing cursor position in todo name input (#1916)

* Fixing cursor position in todo name input

* Replacing let with var

* Defining variables at the top of the function
parent 830b246c
No related branches found
No related tags found
No related merge requests found
......@@ -72,8 +72,10 @@ var app = app || {};
// Switch this view into `"editing"` mode, displaying the input field.
edit: function () {
var textLength = this.$input.val().length;
this.$el.addClass('editing');
this.$input.focus();
this.$input[0].setSelectionRange(textLength, textLength);
},
// Close the `"editing"` mode, saving changes to the todo.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment