# Change Log ## 4.0.6 ### New features/improvements - Add style property to package.json (#5019) - Implement `clear` and `clearing` events (#5058) ### Bug fixes - Add `;` before beginning of factory wrapper (#5089) - Clear tooltip from `select2-selection__rendered` when selection is cleared (#4640, #4746) - Fix keyboard not closing when closing dropdown on iOS 10 (#4680) - User-defined types not normalized properly when passed in as data (#4632) - Perform deep merge for `Defaults.set()` (#4364) - Fix "the results could not be loaded" displaying during AJAX request (#4356) ## 4.0.5 ### Bug fixes - Replace `autocapitalize=off` with `autocapitalize=none` (#4994) ### Translations - Vietnamese: remove an unnecessary quote mark (#5059) - Czech: Add missing commas and periods (#5052) - Spanish: Update the 'errorLoading' message (#5032) - Fix typo in Romanian (#5005) - Improve French translation (#4988) - Add Pashto translation (`ps`) (#4960) - Add translations for lower and upper Sorbian (`dsb` and `hsb`) (#4949) - Updates to Slovak (#4915) - Fixed Norwegian `inputTooShort` message (#4817, 4896) - Add Afrikaans translation (`af`) (#4850) - Add Bosnian translation (`bs`) (#4504) ## 4.0.4 ### New features / Improvements - Make tag matching case insensitive [https://github.com/select2/select2/commit/cb9a90457867ffb14c7b1550bb67e872e0a5c2dd, https://github.com/select2/select2/commit/1167bace78cd3b1a918c1b04f3bac54674eab62b] - Support selecting options with blank or `0` option values [https://github.com/select2/select2/commit/16b4840c0e2df0461998e3b464ee0a546173950d, https://github.com/select2/select2/commit/0358ee528765157234643d289bce6b8ca5889c72] ### Bug fixes - Fix issue with entire form losing focus when tabbing away from a Select2 control (#4419) - Fix UMD support for CommonJS [https://github.com/select2/select2/commit/45a877345482956021161203ac789c25f40a7d5e] ### Documentation - Github Pages documentation has been deprecated, replaced with https://github.com/select2/docs - Add django-autocomplete-light to integrations [https://github.com/select2/select2/pull/4597] - Correct typo in options page [https://github.com/select2/select2/pull/4389] - Correct misspelling in AJAX query parameters example [https://github.com/select2/select2/pull/4435] - "highlight" should be "focus" in focus example [https://github.com/select2/select2/pull/4441] - Correct misspelling in `` 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/select2/select2/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 with `closeOnSelect` [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/select2/select2-bootstrap-theme) [https://github.com/select2/select2/pull/4318] - Added example for using a `