Skip to content

Commit 9148587

Browse files
authored
Merge pull request #213 from spalmer25/ot_tip_get_the_right_document_width
[ot-tip] Use document client width instead of window inner width
2 parents 32f5489 + 09d8dc1 commit 9148587

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
opam-version: "2.0"
22
name: "ocsigen-toolkit"
3-
version: "2.13.0"
3+
version: "3.0.1"
44
maintainer: "dev@ocsigen.org"
55
synopsis: "Reusable UI components for Eliom applications (client only, or client-server)"
66
description: "The Ocsigen Toolkit is a set of user interface widgets that facilitate the development of Eliom applications."

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)