This is the first bugfix release of Select2 4.0.0. It builds upon the first release candidate of Select2 4.0.1 with some minor improvements.
New features / improvements
- The option container is now passed in as the second argument when templating selections using
templateResult
[https://github.com/select2/select2/commit/dc516e7073605723be59bc727b96a3b3dea1ae5a]
- The option container is now passed in as the second argument when templating selections using
templateSelection
[https://github.com//pull/3324]- You can immediately start typing to search when tabbing into a multiple select [https://github.com/select2/select2/commit/02cca7baa7b78e73cdcf393172ee3a54be387167, https://github.com/select2/select2/commit/79cdcc0956e242c1ce642bbaa93e538c54f4be0]
- All parameters passed in for AJAX requests are now set as query string parameters by default [https://github.com//issues/3548]
Bug fixes
- The search box will now be properly sized after removing a selection [https://github.com/select2/select2/commit/5f80c5d9f81f3c5398c3e6e3e84fd6c67c8873f1]
- Dropdown results will now be spoken by screen readers [https://github.com/select2/select2/commit/9fae3d74e373fc646da4e39a0c2ab11efa808c3f]
- Options are now properly cloned when initializing multiple instances at once [https://github.com/select2/select2/commit/3c8366e8769233a6b20ade934fe629279e7be6ff]
selectOnClose
and now be used withcloseOnSelect
without getting a stack overflow [https://github.com/select2/select2/commit/393ca4cf7f7f7097d3a994bda3dbf195e945eba1]- Fixed positioning with non-static parents [https://github.com/select2/select2/commit/c9216b4b966653dd63a67e815b47899ef5325298]
- Fixed bug where multiple selects with placeholders were buggy in IE [https://github.com//issues/3300]
- Fixed bug where AJAX selects could not be initialized with array data [https://github.com//pull/3375]
:all:
is now correctly removed when used incontainerCss
anddropdownCss
options [https://github.com//pull/3464]- Fixed bug where the multiple select search box would appear on the left in RTL mode [https://github.com//pull/3502]
- Change ALT + UP to close the dropdown instead of opening it [https://github.com/select2/select2/commit/d2346cc33186c2a00fa2dad29e8e559c42bfea00]
- Fix focus issue with the multiple select search box when the
change
event was triggered [https://github.com/select2/select2/commit/698fe7b9e187e182f679aa679eb8b0ecb64a846b, https://github.com/select2/select2/commit/88503d2c67dc7f4fb9395a17f17edfe4948cf738, https://github.com/select2/select2/commit/dd2990adead92593a2dffff6ae004ea8b647d130]- Fix bug in
ArrayAdapter
where the existing<option>
data would be used instead of the array data [https://github.com//pull/3565]- Remove random call to
$dropdownContainer.width()
in theAttachBody
decorator [https://github.com//pull/3654]- Fix memory leak in
AttachBody
decorator [https://github.com/select2/select2/commit/671f5a2ce21005090e0b69059799cd3dd1fbbf84]- Selections can no longer be removed when Select2 is in a disabled state [https://github.com/select2/select2/commit/68d068f1d2c7722d011d285a291d1f974bf09772, https://github.com/select2/select2/commit/7d8f86cbf85ebd2179195ff6a2a7a1c5dcb9da58]
- Remove redundant
open
event trigger [https://github.com//pull/3507]- Correct references to
this
inajax.data
andajax.url
callback functions [https://github.com//issues/3361]- Apply select2('option') calls on all elements [https://github.com//pull/3495]
Design
- Fixed original
<select>
not always being hidden correctly in some cases [https://github.com//pull/3301]- Fix potential issue with Bootstrap's gradients in Internet Explorer [https://github.com//pull/3307]
- Improve compatibility with Zurb Foundation [https://github.com//pull/3290]
- Remove padding on mobile safari search field in multiple selects [https://github.com//pull/3605]
- Fix the clear button appearing beneath long text [https://github.com//issues/3306]
- Migrate the CSS classes for the "Loading more results" message to BEM [https://github.com//issues/3889]
- Fix inline search not displaying properly in Safari [https://github.com//issues/3459]
Documentation
- New documentation theme designed by @fk [https://github.com//pull/3376, https://github.com//pull/3467, https://github.com//pull/3488]
- Update ajax example to reflect pagination [https://github.com//pull/3357]
- Fix incorrect option name in
maxiumSelectionLength
example [https://github.com//pull/3454]- Fix typos in the disabled mode/results examples [https://github.com//pull/3665]
- Fix
Option
parameters in the 4.0 announcement [https://github.com//pull/3547]- Fix invalid JSON in the tags example within the 4.0 announcement [https://github.com//pull/3637]
Translations
- Added Cyrillic variant of the Serbian language [https://github.com//pull/3943]
- Corrected Thai "no results found" translation [https://github.com//pull/3782]
- Swapped the
inputTooLong
andinputTooShort
messages in the Galician translation [https://github.com//pull/3291]- Fix improper grammar in Dutch translation [https://github.com//pull/3692]
- Add Japanese translation [https://github.com//pull/3477]
- Polish translation: Fixed typo in maximum selected message [https://github.com//pull/3587]
- Add Malay translation [https://github.com//pull/3635]
- Add
errorLoading
for Indonesian translation [https://github.com//pull/3635]- Correct grammar issues in Hebrew translation [https://github.com//pull/3911]
- Add
errorLoading
for Danish translation [https://github.com//pull/3870]- Add Arabic translation [https://github.com//pull/3859]
Changes that were made in the first release candidate of Select 4.0.1 are included as quoted portions.