mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-29 21:17:17 +00:00
Add focus to note when edit note is clicked
This commit is contained in:
@@ -147,7 +147,12 @@ toggleTrackingEdit = function(){
|
||||
|
||||
toggleNoteEdit = function(){
|
||||
var link = $(this);
|
||||
let input = link.parents('tbody').find('#note')[0]
|
||||
link.parents('tbody').find('tr.edit-note').toggle();
|
||||
// Set focus on input and
|
||||
// put cursor at it's end
|
||||
input.focus()
|
||||
input.setSelectionRange(-1, -1)
|
||||
link.parents('tbody').find('tr.show-note').toggle();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user