Skip to content

Commit 7106107

Browse files
author
Sébastien
committed
Use document client width instead of window inner width
1 parent 32f5489 commit 7106107

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/widgets/ot_tip.eliom

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,7 @@ let%client display ?(container_a = [a_class ["ot-tip-container"]])
4747
@@ Js.Optdef.get Dom_html.window##.innerHeight
4848
@@ fun () -> Dom_html.document##.documentElement##.clientHeight
4949
in
50-
let d_width =
51-
float
52-
@@ Js.Optdef.get Dom_html.window##.innerWidth
53-
@@ fun () -> Dom_html.document##.documentElement##.clientWidth
54-
in
50+
let d_width = float Dom_html.document##.documentElement##.clientWidth in
5551
let o_bounds = origin##getBoundingClientRect in
5652
let o_left = o_bounds##.left in
5753
let o_right = o_bounds##.right in

0 commit comments

Comments
 (0)