From a1178ca3a52e4bd667264b3c3881e51ae9805fb7 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 16 Jul 2017 17:26:34 -0700 Subject: [PATCH] Focus the title editor on open. --- frontends/etiquette_flask/templates/bookmarks.html | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/frontends/etiquette_flask/templates/bookmarks.html b/frontends/etiquette_flask/templates/bookmarks.html index 0c1da8b..f1738e4 100644 --- a/frontends/etiquette_flask/templates/bookmarks.html +++ b/frontends/etiquette_flask/templates/bookmarks.html @@ -100,10 +100,16 @@ function create_bookmark(url, title) } +function on_open(editor, edit_element_map) +{ + editor.open(); + edit_element_map["title"].focus(); +} + function on_save(editor, edit_element_map) { - var title_editor = edit_element_map['title']; - var url_editor = edit_element_map['url']; + var title_editor = edit_element_map["title"]; + var url_editor = edit_element_map["url"]; editor.show_spinner(); function callback() @@ -119,7 +125,6 @@ function on_save(editor, edit_element_map) post(url, data, callback); } -on_open = undefined; on_cancel = undefined; function create_editors()