diff --git a/src/js/babillard.ml b/src/js/babillard.ml index 075293d..80e1c40 100644 --- a/src/js/babillard.ml +++ b/src/js/babillard.ml @@ -5,6 +5,8 @@ open Map module Visibility = struct let new_thread_div = find_by_id "new-thread" + let thread_comment = find_by_id "thread-comment" + let thread_preview_div = find_by_id "thread-preview" let return_button = find_by_id "return-button" @@ -29,6 +31,7 @@ module Visibility = struct set_visible return_button; set_invisible thread_preview_div; Option.iter set_invisible new_thread_button; + El.set_has_focus true thread_comment; Leaflet.Map.close_popup ~popup:None map let to_babillard_mode _event = diff --git a/src/js/post_form.ml b/src/js/post_form.ml index 7fd606c..295721f 100644 --- a/src/js/post_form.ml +++ b/src/js/post_form.ml @@ -19,7 +19,8 @@ let insert_quote el _event = Format.sprintf "%s[>%s] " content emojid else Format.sprintf "%s@\n[>%s] " content emojid in - El.set_prop inner_html (Jstr.of_string new_content) textarea + El.set_prop inner_html (Jstr.of_string new_content) textarea; + El.set_has_focus true textarea let () = log "add inser_quote event on post links@\n";