From 6c1e8e0d06006343e3d4965f86d8af6a6beb7dc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20St=C3=B6ckel?= Date: Thu, 2 Jun 2011 22:50:35 +0000 Subject: [PATCH] Made selection on mobile devices work with touchend and not click (not final) --- etemplate/js/nextmatch_action.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/etemplate/js/nextmatch_action.js b/etemplate/js/nextmatch_action.js index ef7e6ba5d9..29c60af636 100644 --- a/etemplate/js/nextmatch_action.js +++ b/etemplate/js/nextmatch_action.js @@ -39,7 +39,7 @@ function nextmatchRowAOI(_node) $(_node).mousedown(egwPreventSelect); // Now append some action code to the node - $(_node).click(function(e) { + selectHandler = function(e) { // Reset the prevent selection code (in order to allow wanted // selection of text) @@ -54,7 +54,13 @@ function nextmatchRowAOI(_node) !egwBitIsSet(state, EGW_AO_SHIFT_STATE_MULTI) || !selected, state); } - }); + }; + + if (egwIsMobile()) { + _node.ontouchend = selectHandler; + } else { + $(node).click(selectHandler); + } $(aoi.checkBox).change(function() { aoi.updateState(EGW_AO_STATE_SELECTED, this.checked, EGW_AO_SHIFT_STATE_MULTI);