From 1554987e62c41e0948d2ac1780d810de40947eeb Mon Sep 17 00:00:00 2001 From: BuhtigithuB Date: Tue, 3 Mar 2015 10:16:25 -0500 Subject: [PATCH] Fix click popagation to both new and actual tab when CTRL+Click This solved the issue #829 --- applications/welcome/static/js/web2py_bootstrap.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/applications/welcome/static/js/web2py_bootstrap.js b/applications/welcome/static/js/web2py_bootstrap.js index 7206cb1b..db9431c2 100644 --- a/applications/welcome/static/js/web2py_bootstrap.js +++ b/applications/welcome/static/js/web2py_bootstrap.js @@ -29,5 +29,12 @@ jQuery(function(){ } hoverMenu(); // first page load jQuery(window).resize(hoverMenu); // on resize event - jQuery('ul.nav li.dropdown a').click(function(){window.location=jQuery(this).attr('href');}); + jQuery('ul.nav li.dropdown a').click(function(event){ + event.stopProgpagation(); + if(event.originalEvent.ctrlKey){ + window.open(jQuery(this).attr('href'), "_blank"); + } else { + window.location.href=jQuery(this).attr('href'); + } + }); });