mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-03 13:19:51 +01:00
fixed issue where hitting enter while searching for groups would cause the page to reload.
This commit is contained in:
@@ -32,16 +32,18 @@ define('forum/groups/list', function() {
|
||||
|
||||
// Group searching
|
||||
$('#search-text').on('keydown', function(e) {
|
||||
if (e.keyCode === 13) { Groups.search(); }
|
||||
if (e.keyCode === 13) { Groups.search(e); }
|
||||
});
|
||||
$('#search-button').on('click', Groups.search);
|
||||
};
|
||||
|
||||
Groups.search = function() {
|
||||
Groups.search = function(event) {
|
||||
var groupsEl = $('#groups-list'),
|
||||
queryEl = $('#search-text'),
|
||||
sortEl = $('#search-sort');
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
socket.emit('groups.search', {
|
||||
query: queryEl.val(),
|
||||
options: {
|
||||
|
||||
Reference in New Issue
Block a user