diff --git a/app/templates/forum/edit_comment.html b/app/templates/forum/edit_comment.html index 18ba28a..de4d7af 100644 --- a/app/templates/forum/edit_comment.html +++ b/app/templates/forum/edit_comment.html @@ -31,7 +31,7 @@ {% endfor %} {% endif %} - {{ widget_editor.text_editor(form.message, label=False) }} + {{ widget_editor.text_editor(form.message, label=False, autofocus=True) }}
{{ form.submit(class_='bg-ok') }}
diff --git a/app/templates/widgets/editor.html b/app/templates/widgets/editor.html index c4dc0a4..5ac3706 100644 --- a/app/templates/widgets/editor.html +++ b/app/templates/widgets/editor.html @@ -1,11 +1,11 @@ -{% macro text_editor(field, label=True) %} +{% macro text_editor(field, label=True, autofocus=false) %} {{ field.label if label }} {{ field() }}