From 2e4801663c9bdd9e7698b6c663ac55f605b9fad8 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Thu, 28 Sep 2017 16:59:39 +0300 Subject: [PATCH] Fix auto submission on mobile --- app/assets/javascripts/halfnarp.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/halfnarp.js b/app/assets/javascripts/halfnarp.js index 4a72c9d..34a4317 100644 --- a/app/assets/javascripts/halfnarp.js +++ b/app/assets/javascripts/halfnarp.js @@ -222,6 +222,7 @@ if ( $( this ).hasClass('highlighted') ) { $( this ).toggleClass('selected'); $('.info').addClass('hidden'); + $('.submit').click(); } else { $('.highlighted').removeClass('highlighted'); $( this ).addClass('highlighted'); @@ -229,8 +230,8 @@ } else { $( this ).toggleClass('selected'); $('.info').addClass('hidden'); + $('.submit').click(); } - $('.submit').click(); event.stopPropagation(); }); /* Put new event into DOM tree. Track defaults to 'Other' */