You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The React-based Unsplash search component, used in the lexical editor and the design editor in Settings (/settings/design/edit), has a race condition where the search for the complete query sometimes never fires. Instead, only a request for a partial keyword is sent. For example, typing "Jupiter" may trigger a request for "Jupi" only, with no request for the full "Jupiter" query.
Previously, I reported a similar bug affecting the Ember-based Unsplash component, where full-term results were appended to partial-term results. While the symptoms may look similar, the root causes differ: in the React component, the request for the full keyword never fires.
A few examples:
1. Search for "Germany", but API request fires only for "Germ"
The network tab shows no request for the full Germany term.
unsp1.mp4
Search for "mobile", search fires for "mob" and not for the full term
The network request does not fire for the full term. Towards the end of the video, I add a trailing space to force a search for the full term, to showcase the results for "mobile".
unsp2.mp4
Impact
Affects both lexical editor (/posts, /pages) and design editor (/settings/design/edit) since both use the same Koenig Unsplash selector package.
Leads to misleading search results unless the user forces a re-search (e.g., by adding a trailing space).
Steps to Reproduce
Open the lexical editor by navigating to /posts
Type /unsplash to open the Unsplash embed
Search for a multi-character term (e.g., "Germany" or "mobile").
Observe that the network requests may not include the full search term.
Same root package used in /settings/design/edit, so the issue reproducible there as well
Ghost Version
6.0.0-0-g5b8c97d+moya
Node.js Version
22
How did you install Ghost?
Ghost pro
Database type
MySQL 8
Code of Conduct
I agree to be friendly and polite to people in this repository
Issue Summary
The React-based Unsplash search component, used in the lexical editor and the design editor in Settings (
/settings/design/edit), has a race condition where the search for the complete query sometimes never fires. Instead, only a request for a partial keyword is sent. For example, typing "Jupiter" may trigger a request for "Jupi" only, with no request for the full "Jupiter" query.Previously, I reported a similar bug affecting the Ember-based Unsplash component, where full-term results were appended to partial-term results. While the symptoms may look similar, the root causes differ: in the React component, the request for the full keyword never fires.
A few examples:
1. Search for "Germany", but API request fires only for "Germ"
The network tab shows no request for the full
Germanyterm.unsp1.mp4
The network request does not fire for the full term. Towards the end of the video, I add a trailing space to force a search for the full term, to showcase the results for "mobile".
unsp2.mp4
Impact
Affects both lexical editor (
/posts,/pages) and design editor (/settings/design/edit) since both use the same Koenig Unsplash selector package.Leads to misleading search results unless the user forces a re-search (e.g., by adding a trailing space).
Steps to Reproduce
/posts/settings/design/edit, so the issue reproducible there as wellGhost Version
6.0.0-0-g5b8c97d+moya
Node.js Version
22
How did you install Ghost?
Ghost pro
Database type
MySQL 8
Code of Conduct