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

vsx: fix search input behavior #9772

Merged
merged 1 commit into from
Jul 29, 2021
Merged

vsx: fix search input behavior #9772

merged 1 commit into from
Jul 29, 2021

Conversation

vince-fugnitto
Copy link
Member

What it does

Fixes: #9771

The commit fixes the search input behavior which would always move the cursor to the end of the input when inputting characters, even those in between. The issue was the mismatch of react controlled and uncontrolled input, which would mean keeping a state about the cursor during updates.

How to test

  1. start the application, and open the extensions-view
  2. perform a regular search - should work correctly
  3. add characters in the middle of the search term - should work correctly
  4. click the clear-all toolbar item - should clear the search input
  5. search for @builtin - the results should show installed builtins

Review checklist

Reminder for reviewers

Signed-off-by: vince-fugnitto vincent.fugnitto@ericsson.com

@vince-fugnitto vince-fugnitto added the vsx-registry Issues related to Open VSX Registry Integration label Jul 23, 2021
@vince-fugnitto vince-fugnitto self-assigned this Jul 23, 2021
The commit fixes the search input behavior which would always move the
cursor to the end of the input when inputting characters, even those in
between.

The issue was the mismatch of react controlled and uncontrolled input,
which would mean keeping a state about the cursor during updates.

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that the issue exists on master and is adressed nicely by this change.

Copy link
Contributor

@colin-grant-work colin-grant-work left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fewer controlled inputs, the better. :-)

@vince-fugnitto vince-fugnitto merged commit 103e19b into master Jul 29, 2021
@vince-fugnitto vince-fugnitto deleted the vf/vsx-react branch July 29, 2021 14:23
@github-actions github-actions bot added this to the 1.16.0 milestone Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vsx-registry Issues related to Open VSX Registry Integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vsx: extensions-view search input cursor skips to the end
3 participants