From c63165b002d5bfae5817ca161e3e40f32744e3b6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 25 Jul 2023 11:20:28 +0200 Subject: [PATCH] Fix comma detection in Ui/ItemList/Static This got broken during the TypeScript migration in c04fd6ce08b40262c660d38dbd491c37aed49a89. see https://www.woltlab.com/community/thread/300812-itemlist-static-separierung-per-komma-funktioniert-nicht/ --- ts/WoltLabSuite/Core/Ui/ItemList/Static.ts | 2 +- .../install/files/js/WoltLabSuite/Core/Ui/ItemList/Static.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/WoltLabSuite/Core/Ui/ItemList/Static.ts b/ts/WoltLabSuite/Core/Ui/ItemList/Static.ts index 1b45ab2bde..8e00e311ee 100644 --- a/ts/WoltLabSuite/Core/Ui/ItemList/Static.ts +++ b/ts/WoltLabSuite/Core/Ui/ItemList/Static.ts @@ -168,7 +168,7 @@ function keyDown(event: KeyboardEvent): void { * Handles the `[ENTER]` and `[,]` key to add an item to the list. */ function keyPress(event: KeyboardEvent): void { - if (event.key === "Enter" || event.key === "Comma") { + if (event.key === "Enter" || event.key === ",") { event.preventDefault(); const input = event.currentTarget as HTMLInputElement; diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/ItemList/Static.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/ItemList/Static.js index 7bcc2fd84b..48f24edac9 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/ItemList/Static.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/ItemList/Static.js @@ -117,7 +117,7 @@ define(["require", "exports", "tslib", "../../Core", "../../Dom/Traverse", "../. * Handles the `[ENTER]` and `[,]` key to add an item to the list. */ function keyPress(event) { - if (event.key === "Enter" || event.key === "Comma") { + if (event.key === "Enter" || event.key === ",") { event.preventDefault(); const input = event.currentTarget; const value = input.value.trim(); -- 2.20.1