it kinda worked but it's so slow i decided to try lablgtk instead
This commit is contained in:
@ -15,7 +15,7 @@ let resize ~container ~textbox () =
|
||||
textbox##.style##.height := Js.string "auto";
|
||||
textbox##.style##.height
|
||||
:= Js.string (Printf.sprintf "%dpx" (max 18 textbox##.scrollHeight));
|
||||
container##.scrollTop := container##.scrollHeight;
|
||||
(* container##.scrollTop := container##.scrollHeight; *)
|
||||
Lwt.return ()
|
||||
|
||||
let appendchild ~container html =
|
||||
@ -37,7 +37,7 @@ let _ =
|
||||
[ txt "starting..." ];
|
||||
]);
|
||||
let textbox : 'a Js.t =
|
||||
by_id_coerce "userinput" Dom_html.CoerceTo.textarea
|
||||
by_id_coerce "code" Dom_html.CoerceTo.textarea
|
||||
in
|
||||
let rootrepo = Store.test_pull () in
|
||||
rootrepo >>= fun (_upstream, t) ->
|
||||
@ -65,11 +65,11 @@ let _ =
|
||||
(* setup handlers *)
|
||||
textbox##.onkeyup :=
|
||||
Dom_html.handler (fun _ ->
|
||||
Lwt.async (resize ~container ~textbox);
|
||||
(* Lwt.async (resize ~container ~textbox); *)
|
||||
Js._true);
|
||||
textbox##.onchange :=
|
||||
Dom_html.handler (fun _ ->
|
||||
Lwt.async (resize ~container ~textbox);
|
||||
(* Lwt.async (resize ~container ~textbox); *)
|
||||
Js._true);
|
||||
textbox##.onkeydown :=
|
||||
Dom_html.handler
|
||||
|
||||
Reference in New Issue
Block a user