From cf465c3a0345ddcfdb9231063fb0fb4112e362f5 Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Fri, 20 May 2016 15:22:40 +0200 Subject: [PATCH] PHRAS-1115 - fix lightbox mobile events handling --- resources/www/lightbox/js/jquery.validator.mobile.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/resources/www/lightbox/js/jquery.validator.mobile.js b/resources/www/lightbox/js/jquery.validator.mobile.js index e9a5feaa6b..04845c42b9 100644 --- a/resources/www/lightbox/js/jquery.validator.mobile.js +++ b/resources/www/lightbox/js/jquery.validator.mobile.js @@ -2,8 +2,8 @@ $(document).ready(function () { if (typeof validator_loaded === 'boolean') return; - - $('.confirm_report').on('click', function () { + $('body').on('touchstart click', '.confirm_report', function (event) { + event.preventDefault(); var $this = $(this); $('.loader', $this).css({ @@ -38,9 +38,10 @@ $(document).ready(function () { return; } }); + return false; }); - $('.agreement_radio').on('vmousedown', function () { + $('body').on('touchstart click', '.agreement_radio', function (event) { var sselcont_id = $(this).attr('for').split('_').pop(); var agreement = $('#' + $(this).attr('for')).val() == 'yes' ? '1' : '-1'; @@ -81,10 +82,11 @@ $(document).ready(function () { return; } }); - return false; + //return false; }); - $('.note_area_validate').on('click', function () { + + $('body').on('touchstart click', '.note_area_validate', function (event) { var sselcont_id = $(this).closest('form').find('input[name="sselcont_id"]').val(); $.mobile.loading();