Skip to content
Snippets Groups Projects
Unverified Commit 16d963b7 authored by Rodrigo Nascimento's avatar Rodrigo Nascimento
Browse files

Prevent form submit on submit and not on keydown

parent db35fad2
No related branches found
No related tags found
No related merge requests found
......@@ -36,9 +36,8 @@ Template.listChannelsFlex.events
t.limit.set(t.limit.get() + 50)
, 200
'keydown #channel-search': (e) ->
if e.keyCode is 13
e.preventDefault()
'submit .search-form': (e) ->
e.preventDefault()
'keyup #channel-search': _.debounce (e, instance) ->
instance.nameFilter.set($(e.currentTarget).val())
......
......@@ -39,10 +39,8 @@ Template.listDirectMessagesFlex.events({
SideNav.leaveArrow();
},
'keydown #channel-search': function(e) {
if (e.keyCode === 13) {
e.preventDefault();
}
'submit .search-form': function(e) {
e.preventDefault();
},
'keyup #channel-search': _.debounce((e, instance) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment