Skip to content

Commit 5492878

Browse files
vouillonTyOverby
andauthored
Lib: Fix Dom_html.Keyboard_code.of_event (#1878)
For the standard location (0) we were ignoring the `code` property of the keyboard event and using the deprecated `keyCode` property instead. Co-authored-by: Ty Overby <ty@pre-alpha.com>
1 parent 2be8d1c commit 5492878

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGES.md

+2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@
1818
* Compiler: fix stack overflow issues with double translation (#1869)
1919
* Compiler: minifier fix (#1867)
2020
* Compiler: fix assert failure with double translation (#1870)
21+
* Lib: fix Dom_html.Keyboard_code.of_event (#1878)
2122
* Runtime: fix Int64.of_string overflow check (#1874)
2223
* Runtime: fix caml_string_concat when not using JS strings (#1874)
2324

25+
2426
# 6.0.1 (2025-02-07) - Lille
2527

2628
## Features/Changes

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)