This is the third bugfix release of Select2 4.0.0. It builds upon the second bugfix release and fixes many common issues.
New features / Improvements
- The old
dropdownAutoWidth
option now properly works [https://github.com/select2/select2/commit/fe26b083eb830836061de1458e483782cefef424] - A
focus
event on the original<select>
is now handled [https://github.com/select2/select2/commit/31e7a1d4c52ed7477769fcad5d15166ae3c9b4d0] - Adding and removing options now refreshes the selection automatically [https://github.com/select2/select2/commit/ea79a197e0ffe55aa600eed6d18cbd1c804c3176]
Bug fixes
select2('option')
no longer mutate the arguments when working on multiple elements [https://github.com/select2/select2/commit/c2c1aeef31c95c6df5545c900a4e1782d712497c]- Better detect aborted requests [https://github.com/select2/select2/commit/cfb66f5e4f71a56c46a6890c5dde4b7f24f11fa8]
- New options are now properly created during tokenization [https://github.com/select2/select2/commit/3b8cd2e36990e695e4cb4b966c8658e7ca1574dc]
- Fix positioning bug with non-static parents for the dropdown [https://github.com//pull/4267]
- Infinite scrolling no longer resets the keyboard focus [https://github.com/select2/select2/commit/e897d008a672da262ba84cee2a144578696ada29, https://github.com/select2/select2/commit/9f581285d88128b29a01fc1e5fd2d445d610b553]
selectOnClose
now works properly withcloseOnSelect
[https://github.com/select2/select2/commit/481c43883e23874e9c35879d173eb8cc5b994b12]- Apply
ajax.delay
to empty search terms as well [https://github.com/select2/select2/commit/4b9e02f02211248be25ac4c16d4635cf38237bb9]
Documentation
- Added example for attaching event listeners [https://github.com/select2/select2/commit/84d6b5d840f7f4e6b7a2fb3f08424bf5495c876d]
- Correct link to the Select2 Bootstrap Theme [https://github.com//pull/4318]
- Added example for using a
<label>
[https://github.com/select2/select2/commit/3bc7f4ac78b58eff8cd17b3273596638c3c9c5c1] - Add documentation for
ajax.url
[https://github.com/select2/select2/commit/5a831afb9a7d46e8f20aec21164cfbfd182024de] - Added favicon [https://github.com//pull/4379]
Translations
- Add Khmer translation [https://github.com//pull/4246]
- Added Norwegian bokmaal for
errorLoading
[https://github.com//pull/4259] - Fixed pluralization in Lithuanian translation [https://github.com/select2/select2/commit/5b5eddd183c87bf43165b3a98e03eabe10e9fa58]
- Add French translation for
errorLoading
[https://github.com/select2/select2/commit/b1ea28bb7d8c02b3b352f558031ccfc8041122eb] - Add Greek translation [https://github.com//pull/4139]