autofocus textarea
This commit is contained in:
parent
6963e068c8
commit
a6fc9b4346
2 changed files with 5 additions and 1 deletions
|
|
@ -5,6 +5,8 @@ open Map
|
||||||
module Visibility = struct
|
module Visibility = struct
|
||||||
let new_thread_div = find_by_id "new-thread"
|
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 thread_preview_div = find_by_id "thread-preview"
|
||||||
|
|
||||||
let return_button = find_by_id "return-button"
|
let return_button = find_by_id "return-button"
|
||||||
|
|
@ -29,6 +31,7 @@ module Visibility = struct
|
||||||
set_visible return_button;
|
set_visible return_button;
|
||||||
set_invisible thread_preview_div;
|
set_invisible thread_preview_div;
|
||||||
Option.iter set_invisible new_thread_button;
|
Option.iter set_invisible new_thread_button;
|
||||||
|
El.set_has_focus true thread_comment;
|
||||||
Leaflet.Map.close_popup ~popup:None map
|
Leaflet.Map.close_popup ~popup:None map
|
||||||
|
|
||||||
let to_babillard_mode _event =
|
let to_babillard_mode _event =
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,8 @@ let insert_quote el _event =
|
||||||
Format.sprintf "%s[>%s] " content emojid
|
Format.sprintf "%s[>%s] " content emojid
|
||||||
else Format.sprintf "%s@\n[>%s] " content emojid
|
else Format.sprintf "%s@\n[>%s] " content emojid
|
||||||
in
|
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 () =
|
let () =
|
||||||
log "add inser_quote event on post links@\n";
|
log "add inser_quote event on post links@\n";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue