From def3a373a7b912c0cc8f241c1753c29764faba89 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Mon, 8 Jun 2020 10:26:16 -0400 Subject: [PATCH] Autofocus the comment field when adding a new OSM note (close #7680) --- modules/modes/add_note.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/modes/add_note.js b/modules/modes/add_note.js index b257663cd..fa924d505 100644 --- a/modules/modes/add_note.js +++ b/modules/modes/add_note.js @@ -34,6 +34,10 @@ export function modeAddNote(context) { context .selectedNoteID(note.id) .enter(modeSelectNote(context, note.id).newFeature(true)); + + // autofocus the description field + context.container() + .select('.sidebar textarea.new-comment-input').node().focus(); }