Skip to content

Commit 96f4c46

Browse files
committed
Fix Dom_html.Keyboard_code.of_event
For the standard location (0) we were ignoring the `code` property of the keyboard event and using the deprecated `keyCode` property instead.
1 parent 559fbce commit 96f4c46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/js_of_ocaml/dom_html.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3383,7 +3383,7 @@ module Keyboard_code = struct
33833383
| 1 -> run_next (get_key_code evt) try_key_code_left
33843384
| 2 -> run_next (get_key_code evt) try_key_code_right
33853385
| 3 -> run_next (get_key_code evt) try_key_code_numpad
3386-
| _ -> make_unidentified
3386+
| _ -> fun v -> v
33873387

33883388
let ( |> ) x f = f x
33893389

0 commit comments

Comments
 (0)