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

Apollo Error When Saving Category Name with Highlighted Auto-Suggestion #639

Open
MahnoorNaseer opened this issue Aug 8, 2024 · 0 comments

Comments

@MahnoorNaseer
Copy link

Description:
When entering the name of a category in the Admin dashboard, if past suggestions pop up and a suggestion is highlighted using the arrow keys, clicking "Save" results in an Apollo error. This seems to occur because the auto-suggestion in Google Chrome sends the input incorrectly, leading to a validation failure (Hypothesis).

Steps to Reproduce:
1-Navigate to the Admin dashboard.
2-Start typing the name of a category in the category input field.
3-When past suggestions appear, use the arrow keys to highlight one of them.
4-Click "Save" while a suggestion is highlighted.
5-Observe the error.

Expected Behavior:
The selected suggestion should be correctly recognized as valid input, and the category should be saved without any errors.

Actual Behavior:
An Apollo error occurs, and the category is not saved. The input is not recognized as valid due to incorrect handling by the auto-suggestion feature in Google Chrome.

Environment:
Browser: Google Chrome
Affected feature: Category name input in Admin dashboard
Issue: Apollo error when saving

Hypothesis:
The auto-suggestion mechanism in Google Chrome may be sending incorrect input data, leading to a validation error when trying to save the highlighted suggestion.

Additional Information:
The issue occurs specifically when a suggestion is highlighted and "Save" is clicked while the suggestion is still active.
The error does not occur when typing the full category name manually without relying on auto-suggestions.

Screenshots/Logs:
(https://github.com/user-attachments/assets/1161efdc-31e9-48a4-b390-6fb8423acc56)

Possible Solution:
Investigate how the auto-suggestion input is being handled by the Apollo client, particularly when suggestions are highlighted using the arrow keys. Consider updating the input handling logic to correctly parse and validate the highlighted suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant