Skip to content

Commit

Permalink
[FIX] Pressing Enter in User Search field at channel causes reload (#…
Browse files Browse the repository at this point in the history
…14388)

* Prevent default on enter in User search

* Prevent form submission in membersList
  • Loading branch information
MarcosSpessatto authored and rodrigok committed May 7, 2019
1 parent 0161ebb commit 020544d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/ui-flextab/client/tabs/membersList.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{#if isGroupChat}}
{{#with roomUsers}}
<div class="flex-tab__header">
<form class="search-form rc-member-list__search" role="form">
<form class="search-form rc-member-list__search js-search-form" role="form">
<div class="rc-input">

<div class="rc-input__icon">
Expand Down
7 changes: 7 additions & 0 deletions app/ui-flextab/client/tabs/membersList.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,13 @@ Template.membersList.events({

Template.parentData(0).tabBar.open();
},
'submit .js-search-form'(event) {
event.preventDefault();
event.stopPropagation();
},
'keydown .js-filter'(event, instance) {
instance.filter.set(event.target.value.trim());
},
'input .js-filter'(e, instance) {
instance.filter.set(e.target.value.trim());
},
Expand Down

0 comments on commit 020544d

Please sign in to comment.