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

Fixed issue country/region field showed Id instead of name when using arrow keys #4192

Merged
merged 2 commits into from
Oct 15, 2020
Merged

Conversation

joshgk00
Copy link
Contributor

Fixes #3671

Summary

jquery-ui has a default behavior for autocomplete fields where it will use the ui.item.id to update the input field when using the arrow keys to navigate the autocomplete suggestions.

The change that was made was to add an event handler for the focus event so that we could override the default behavior and show the ui.item.name as the user uses the arrow keys to navigate the autocomplete suggestions.

This makes for a better experience so that users know what suggestion they will be selecting as they scroll through the suggestions with the arrow keys.

How to test

  • Login to DNN
  • Click the Username at the top to view your user profile
  • Click Edit Profile
  • Expand the Address section
  • In the country field, begin typing uni for United States
  • You'll see a list of suggestions, use the arrow keys to navigate the list
  • The country textbox should now show the country name as you move through the list

Before this fix:

  • Begin typing a country name
  • When the suggestions popup, use the arrow keys to navigate the list
  • You'll notice that the textbox shows a number instead of the country name

After this fix:

  • Begin typing a country name
  • When the suggestions popup, use the arrow keys to navigate the list
  • You'll notice that the textbox shows the country name as you press the keys

…ld show the Id instead of the name when using the arrow keys to navigate the autocomplete suggestions
@dnfadmin
Copy link

dnfadmin commented Oct 14, 2020

CLA assistant check
All CLA requirements met.

@joshgk00 joshgk00 marked this pull request as ready for review October 14, 2020 19:56
Copy link
Contributor

@bdukes bdukes left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@valadas valadas left a comment

Choose a reason for hiding this comment

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

Awesome, thank you very much @joshgk00

@valadas valadas added this to the 9.8.1 milestone Oct 14, 2020
Co-authored-by: Brian Dukes <bdukes@engagesoftware.com>
@bdukes bdukes merged commit f5660d9 into dnnsoftware:develop Oct 15, 2020
@joshgk00 joshgk00 deleted the Issue3671 branch October 19, 2020 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Droplists showing value not text
5 participants