Skip to content

Conversation

@roykho
Copy link
Contributor

@roykho roykho commented Sep 1, 2021

… focused closes #30607

All Submissions:

Changes proposed in this Pull Request:

Closes #30607

Some alternatives I've tried is to use jQuery however browsers are not liking it so I opted to use the native DOM element combine with vanilla JS instead.

How to test the changes in this Pull Request:

  1. Go to an existing order click on "Add item" button. Make sure the order is in "Pending" status.
  2. Then click on "Add product(s)" button.
  3. You will see a popup menu. Click on TAB on the keyboard until it focuses on the Select2 Dropdown.
  4. Start typing for a product to search.
  5. Ensure it opens the dropdown and it starts searching for your key terms. Search for one that actually exists, highlight it and press enter.
  6. Press your Tab key twice to highlight the next Select2 dropdown and repeat steps 4-5.
  7. Ensure it gets focused is working.
  8. Check other Select2 dropdowns and ensure there are no regression. Such as the Country dropdown field on checkout.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?

Changelog entry

Fix - Select2 dropdown search input not getting focus when select2 dropdown element gets focused.

FOR PR REVIEWER ONLY:

  • I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled.

@roykho roykho requested review from a team and jonathansadowski and removed request for a team September 1, 2021 19:19
Copy link
Contributor

@jonathansadowski jonathansadowski left a comment

Choose a reason for hiding this comment

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

Field is focusing now as expected. Good job 👍

@jonathansadowski jonathansadowski merged commit f939eef into trunk Sep 1, 2021
@jonathansadowski jonathansadowski deleted the fix/30607 branch September 1, 2021 22:59
@github-actions github-actions bot added this to the 5.8.0 milestone Sep 1, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2021

Hi @jonathansadowski, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:

  • Add the status: needs changelog label
  • Add the status: needs testing instructions label

@jonathansadowski jonathansadowski added release: add changelog Mark all PRs that have not had their changelog entries added. [auto] release: add testing instructions PRs that have not had testing instructions added to the wiki. [auto] labels Sep 1, 2021
@zhongruige zhongruige added testing instructions added and removed release: add testing instructions PRs that have not had testing instructions added to the wiki. [auto] labels Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: add changelog Mark all PRs that have not had their changelog entries added. [auto]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Opening a select2 drop-down no longer places the cursor in the "search" field.

4 participants