Browse Source

stop enter on groupinfo and userinfo pages too

Ryan Lerch 8 years ago
parent
commit
92559a559a
2 changed files with 12 additions and 1 deletions
  1. 6 1
      pagure/templates/group_info.html
  2. 6 0
      pagure/templates/user_info.html

+ 6 - 1
pagure/templates/group_info.html

@@ -104,7 +104,12 @@
   <script src="{{ url_for('static', filename='selectize.min.js') }}" type="text/javascript"> </script>
   <script type="text/javascript">
   $(document).ready(function() {
-
+    $('#headerSearch').on('keypress keydown keyup', function(e) {
+      if (e.which == 13) {
+          e.preventDefault();
+          return false;
+      }
+    });
     $('#term').selectize({
       valueField: 'group',
       labelField: 'group',

+ 6 - 0
pagure/templates/user_info.html

@@ -73,6 +73,12 @@
 <script src="{{ url_for('static', filename='selectize.min.js') }}" type="text/javascript"> </script>
 <script type="text/javascript">
 $(document).ready(function() {
+  $('#headerSearch').on('keypress keydown keyup', function(e) {
+    if (e.which == 13) {
+        e.preventDefault();
+        return false;
+    }
+  });
   $('#term').selectize({
     valueField: 'user',
     labelField: 'user',