Problem/Motivation
The Drupal Chosen 5.x version currently uses noli42/chosen library version 3.0.1 via composer.libraries.json. This version contains a bug that causes a JavaScript error in the browser console:
Uncaught TypeError: Cannot set property which of # which has only a getter
at s.mousedown_checker (chosen.min.js?v=3.0.1:1:11703)
at s.test_active_click (chosen.min.js?v=3.0.1:1:23064)
at HTMLDocument.click_test_action (chosen.min.js?v=3.0.1:1:1846)
This issue ( https://github.com/noli42/chosen/issues/6 ) has already been fixed upstream in a newer release of the noli42/chosen library:
https://github.com/noli42/chosen/releases/tag/3.0.2
Steps to reproduce
- Install Drupal Chosen 5.x
- Use a Chosen-enhanced select element
- Open browser console
- Interact with the select field and then move focus to the next field
Proposed resolution
Update the noli42/chosen dependency in composer.libraries.json to the latest available release that includes the fix.
Comments
Comment #2
nagy.balint commentedHi!
We can do it, but likely better if this other issue is validated, as it is also related to the library.
#3513086: Chosen widget has no option to autosubmit when you select an item from the list of choices
Comment #4
nagy.balint commented