Browse Source

Merge remote-tracking branch 'rudiedirkx/CtrlEnterSearch'

Jordi Boggiano 9 years ago
parent
commit
8712b309e6
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/Packagist/WebBundle/Resources/public/js/search.js

+ 7 - 1
src/Packagist/WebBundle/Resources/public/js/search.js

@@ -129,7 +129,13 @@
         }
 
         if (keymap.enter === event.which && currentSelected.data('url')) {
-            window.location = currentSelected.data('url');
+            var url = currentSelected.data('url');
+            if (event.ctrlKey) {
+                window.open(url);
+                return;
+            }
+
+            window.location = url;
             return;
         }