From 689ac0983f5080ea670b87bec5d26bc2c82c9fae Mon Sep 17 00:00:00 2001 From: daniel-giralt-len Date: Fri, 1 May 2020 16:42:24 +0200 Subject: [PATCH] fix: radio inputs call updateContent twice --- js/translations.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/translations.js b/js/translations.js index 89fa915..d4f0393 100644 --- a/js/translations.js +++ b/js/translations.js @@ -55,7 +55,9 @@ i18next $(document).ready(initialize); let delayTimer; - $(document).on('input', function() { + $(document).on('input', function(event) { + //prevent radio input from updating content twice per input change + if(event.target.type === 'radio'){ return } // adding short delay after input to help mitigate potential lag after keystrokes clearTimeout(delayTimer); delayTimer = setTimeout(function() {