From 7887cc6df74e44e04e5023c92c3d461973dc6688 Mon Sep 17 00:00:00 2001 From: Matias Larsson Date: Thu, 28 Feb 2013 15:44:59 +0100 Subject: [PATCH] Added event.preventDefault to lastclick and firstclick Now using event.preventDefault on the remaining clicks of the lastclick and firstclick events since there's no point in allowing default actions on them. --- scripts/resources/jquery.events.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/resources/jquery.events.js b/scripts/resources/jquery.events.js index e817b78..3d21ce5 100755 --- a/scripts/resources/jquery.events.js +++ b/scripts/resources/jquery.events.js @@ -165,6 +165,9 @@ $el.data('lastclick-timeout',timeout); }; var check = function(event){ + // Don't allow default actions when we're using lastclick + event.preventDefault(); + // Fetch var Me = this; clear.call(Me); @@ -239,6 +242,10 @@ event.type = 'firstclick'; $.event.handle.apply(Me, [event]) } + // Don't allow default actions on the remaining clicks when we're using firstclick + else { + event.preventDefault(); + } // Handle Timeout for when All Clicks are Completed var timeout = setTimeout(function(){ // Clear Timeout