end
| None -> assert false (* every element has a parent *)
-let click mathview (element : Gdome.element) _ =
+let click mathview (element : Gdome.element option) _ =
let module G = Gdome in
- if not (jump element) then
- if not (mathview#action_toggle element) then
- ()
+ match element with
+ None -> print_string "CLICKED ON NOTHING\n" ; flush stdout
+ | Some element ->
+ if not (jump element) then
+ if not (mathview#action_toggle element) then
+ ()
;;