From 9430413ecfe7c96552a772d40f286a876a830f63 Mon Sep 17 00:00:00 2001 From: I Plan Websites Date: Thu, 2 Nov 2017 15:35:21 -0400 Subject: [PATCH] Fixing a bug with CMD + click --- jquery.pjax.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jquery.pjax.js b/jquery.pjax.js index d57269d4..067a09f6 100644 --- a/jquery.pjax.js +++ b/jquery.pjax.js @@ -35,7 +35,12 @@ function fnPjax(selector, container, options) { opts = $.extend({}, options) opts.container = $(this).attr('data-pjax') } - handleClick(event, opts) + if(event.ctrlKey || event.metaKey){ + return true; //bizness as usual, open in new window + }else{ + handleClick(event, opts) + return false; //prevent other events UNDER the link to be trigered (ex: modal on results) + } }) }