From 3fd46b5b30cd37b946ddd42b38630a28480e0c3c Mon Sep 17 00:00:00 2001 From: Max <m.giller.dev@gmail.com> Date: Fri, 12 Nov 2021 22:47:30 +0100 Subject: [PATCH] Added input validation to simulation time --- editor/editor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/editor.php b/editor/editor.php index 70e636c..ef5ae39 100644 --- a/editor/editor.php +++ b/editor/editor.php @@ -84,7 +84,7 @@ <label for="stop-physics-delay">Amount of time [in seconds] after which the physics simulation is stopped</label> </br> - <input type="number" value="5" id="stop-physics-delay" name="stop-physics-delay" class="small-width"> + <input type="number" onkeypress="return (event.charCode !=8 && event.charCode ==0 || (event.charCode >= 48 && event.charCode <= 57))" value="5" id="stop-physics-delay" name="stop-physics-delay" class="small-width"> </input> </div> </section> -- GitLab