Closed
Description
openedon Oct 21, 2020
Describe the bug
When you want to add a link to your paragraph block, you will open a small modal where you can search for a post on your site. This searchbox adds a ajax query for every onKeyUp resulting in as many queries as the amount of letters in your search. Since the result will not show until all are finished, this can take a very long time(Especially when there are a lot of posts on your site. 45.000 posts resulted in a search that took well over 30 seconds)
To reproduce
Steps to reproduce the behavior:
- Add a paragraph block
- click on Link icon
- Compose a search for posts with many letters
- Inspect in debugger under network(in chrome) and notice that there are as many queries as there are letters written in the search field
Expected behavior
ajax calls that are no longer valid should be aborted when a new one is being called.
Editor version (please complete the following information):
- WordPress version: 5.5.1
- Does the website has Gutenberg plugin installed, or is it using the block editor that comes by default? default
Desktop (please complete the following information):
- OS: Windows 10
- Browser Chrome
- Version 86.0.4240.75
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment