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

Only get suggestions once when the input field is initially focused #175

Merged
merged 1 commit into from
Aug 31, 2016

Conversation

mariushoch
Copy link
Member

Right now the suggestions are loaded whenever the field is empty
and it gets the focus. That's not needed, because old results are
retained anyway, thus we only ever need to get the suggestions
once. (If it gets refocused it displays the old suggestions again.)

This will save us quite some API requests and also will it save us
from race conditions when two such api requests are returning.

https://phabricator.wikimedia.org/T143645

Right now the suggestions are loaded whenever the field is empty
and it gets the focus. That's not needed, because old results are
retained anyway, thus we only ever need to get the suggestions
once. (If it gets refocused it displays the old suggestions again.)

This will save us quite some API requests and also will it save us
from race conditions when two such api requests are returning.

https://phabricator.wikimedia.org/T143645
@thiemowmde
Copy link
Contributor

Makes sense. Thanks a lot for this and a billion other awesome fixes you are doing all over our code bases!

I would like to test this manually before merging it.

@thiemowmde
Copy link
Contributor

Confirmed via live-hacking in Chrome.

@thiemowmde thiemowmde merged commit 2d77cde into master Aug 31, 2016
@thiemowmde thiemowmde deleted the bug/T143645 branch August 31, 2016 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants