The dropdown loses focus unexpectedly when clicking inside it Using Keyboard

  1. Open a page that has a Chosen select dropdown
  2. Navigate on the Chosen dropdown to open it using keyboard
  3. Select any option from the dropdown list using keyboard
  4. After Selection of Drop-Down Using Keyboard Element Will Lose Focus

here is an issue https://github.com/noli42/chosen/issues/10

CommentFileSizeAuthor
#2 Screenshot-Test-Choosen.png32.61 KBdkmishra

Comments

anmol singh created an issue. See original summary.

dkmishra’s picture

StatusFileSize
new32.61 KB

I tested this issue on my local environment but was unable to reproduce the focus loss behavior after keyboard selection.
Tested with:

Drupal version: 11.3
Chosen version/module branch: 5.0.5
Browser: Chrome
OS: Linux

Steps tested:
Opened a page with a Chosen select field
Opened the dropdown using keyboard navigation
Selected an option using arrow keys + Enter
Focus remained on the Chosen element after selection

nagy.balint’s picture

The issue was fixed in the library.

Unfortunately we cannot force the library update in this module, we can only change the version number in the readme and drush commands.

anmol singh’s picture

I think in composer.libraries.json update the library version and it will automatically update the code.

nagy.balint’s picture

That only works if you use wikimedia/composer-merge-plugin, but most users don't.

  • nagy.balint committed c3c048a4 on 5.0.x
    fix: #3590812 Updated the chosen library to fix keyboard accessibility...
nagy.balint’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.