Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression: Add debounce on admin users search to avoid blocking by DDP Rate Limiter #13529

Merged
merged 3 commits into from
Feb 21, 2019

Conversation

MarcosSpessatto
Copy link
Member

No description provided.

@MarcosSpessatto MarcosSpessatto added this to the 0.75.0 milestone Feb 20, 2019
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-13529 February 20, 2019 14:17 Inactive
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-13529 February 20, 2019 17:04 Inactive
Template.adminUsers.events({
'keydown #users-filter'(e) {
if (e.which === 13) {
e.stopPropagation();
e.preventDefault();
}
},
'keyup #users-filter'(e, t) {
'keyup #users-filter': _.debounce((e, t) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should only the the t.filter.set() be debounced? I wonder because the event is not having its propagation stopped nor default prevented...

Copy link
Member Author

@MarcosSpessatto MarcosSpessatto Feb 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sampaiodiego if we debounce this function too, for some reason the event is not prevented, and the form is submitted.

@sampaiodiego sampaiodiego changed the title [FIX]Add debounce on admin users search to avoid blocking by DDP Rate Limiter Regression: Add debounce on admin users search to avoid blocking by DDP Rate Limiter Feb 21, 2019
@sampaiodiego sampaiodiego merged commit 00c59f2 into develop Feb 21, 2019
@sampaiodiego sampaiodiego deleted the fix-admin-users-ratelimiter branch February 21, 2019 14:24
@rodrigok rodrigok mentioned this pull request Apr 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants