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

Last search request to return displays in post selector #428

Open
dlh01 opened this issue Oct 13, 2023 · 0 comments
Open

Last search request to return displays in post selector #428

dlh01 opened this issue Oct 13, 2023 · 0 comments
Labels
bug Something isn't working Post Selector

Comments

@dlh01
Copy link
Member

dlh01 commented Oct 13, 2023

Description of the bug

Somewhat related to #152: If the post selector makes multiple requests to the search endpoint, the last of those requests to return will be the one whose results are displayed, even if it wasn't the last request that was actually sent for the current search term.

Steps To Reproduce

Add this snippet somewhere:

if ( 'par' === ( $_GET['search'] ?? '' ) ) {
	sleep( 5 );
}

Open the post selector and the Network tab of your browser tools. Search for park in the post selector (or use a different word that works better with your test data). You should see search requests for par and park.

The request for park will return first and populate the selector results. The request for par returns second, and the results for that search will replace the results that were there for park.

Additional Information

No response

@dlh01 dlh01 added bug Something isn't working Post Selector labels Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Post Selector
Projects
None yet
Development

No branches or pull requests

1 participant