From 1488689bfb4678e13eafe6a1a6ee190d67806166 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sat, 13 Nov 2021 12:07:22 +0100 Subject: [PATCH] =?UTF-8?q?am=C3=A9liore=20editeur=20coef=20(enter)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/static/js/table_editor.js | 3 ++- app/templates/pn/form_modules_ue_coefs.html | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/static/js/table_editor.js b/app/static/js/table_editor.js index cb50c1fea..c1b9dd9f1 100644 --- a/app/static/js/table_editor.js +++ b/app/static/js/table_editor.js @@ -80,7 +80,7 @@ function modifCell(obj) { function key(event) { switch (event.key) { - case "Enter": modifCell(document.querySelector(".selected")); event.preventDefault(); ArrowMove(1, 0); break; + case "Enter": modifCell(document.querySelector(".selected")); event.preventDefault(); break; case "ArrowRight": ArrowMove(1, 0); break; case "ArrowLeft": ArrowMove(-1, 0); break; case "ArrowUp": ArrowMove(0, -1); break; @@ -110,6 +110,7 @@ function keyCell(event) { } this.classList.remove("modifying"); ArrowMove(0, 1); + modifCell(document.querySelector(".selected")); } } diff --git a/app/templates/pn/form_modules_ue_coefs.html b/app/templates/pn/form_modules_ue_coefs.html index 7c27f70c2..b0116ba79 100644 --- a/app/templates/pn/form_modules_ue_coefs.html +++ b/app/templates/pn/form_modules_ue_coefs.html @@ -64,6 +64,7 @@ //}, 1000); } ); + return true; }