From 670d97da57dfa67a6655f48637b2d2ae24b12450 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Fri, 3 Jan 2020 19:56:58 +0100 Subject: Fix: trigger check when pressing infinitivus --- public/js/luoparsetrainer.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'public') diff --git a/public/js/luoparsetrainer.js b/public/js/luoparsetrainer.js index 5c04ae6..5c750df 100644 --- a/public/js/luoparsetrainer.js +++ b/public/js/luoparsetrainer.js @@ -112,10 +112,10 @@ $(document).ready(function(){ var but = $(''); but.addClass('btn btn-default').attr('role', 'button'); but.text(buts[k]).val(k); - but.click(function(){ + but.click(val, function(ev){ var ip = $('#trainer-input-'+input_count); ip.val(ip.val() + $(this).val()).focus(); - if (step < 3) { + if (step < (ev.data.match(/ inf /) ? 2 : 3)) { stepFancyInput(step + 1, ip.val()); } else { var done = checkInput(true); @@ -173,7 +173,7 @@ $(document).ready(function(){ } }).focus(); - stepFancyInput(0); + stepFancyInput(0, ''); } function removeInputs() { -- cgit v1.2.3