Previously `this` would point to the AjaxAdapter that was being used to
process the AJAX, or sometimes the JS object holding the AJAX options,
instead of the jQuery element that Select2 was attached to. This fixes
the issue so `this` will consistently point to the jQuery element, just
like in past versions of Select2.
This closes https://github.com/select2/select2/issues/3361
This closes https://github.com/select2/select2/pull/3410
About `errorLoading`:
Before the correction, the translation was: "התוצאות לא נטענו בהלכה".
The word "בהלכה" is wrong and should be spelled "כהלכה", but besides that, this translations means "The results were loaded improperly", while my corrected translation means "Error while loading results", which is what needed.
About `inputTooLong`, `inputTooShort`, `maximumSelected`:
In Hebrew, it's not acceptable to have the digit 1 for representing a single object. You should use the actual word "one", which is "אחד" in Hebrew together with the singular noun (e.g. "one item" / "one character", instead of "1 item" / "1 character").
**These 3 parts needed a critical fix anyway**, because they were addind the English letter 's' to the end of the Hebrew string.
About `loadingMore`:
The translation was "טען תוצאות נוספות" which means "Load more results", as an instruction, probably a typo.
I changed "טען" to "טוען" so now it means "loading more results", which is the correct form.
This closes https://github.com/select2/select2/pull/3911
Previously we were only disabling the `input` handler when it was
triggered, which caused a race condition within the `keyup` handlers
which also was triggered by the `input` event. This fixes the issue by
also unbinding the `input` handlers within the `keyup` handler, to avoid
running into the race condition.
Thanks to @Eckankar for pointing out the race condition that still
existed in
66ae2ad1d5
This closes https://github.com/select2/select2/issues/3300
This adds two notes, one pointing to the old documentation and the other
pointing to the community, for getting extra help if their question is
not answered.
This adds more questions that will eventually get answers. Most of these
questions are already answered either in the current documentation or on
Stack Overflow, so it shouldn't be too difficult to fill out answers for
them.
Right now this sets up the new FAQ/Options page with most of the
questions for the how to control the selection. Not all of these
questions have answers, most of them weren't moved over, but there are
plans to add detailed answers to all of them.
The questions were aggregated based on common Stack Overflow and IRC
questions, as well as commonly asked things on GitHub.
The `createTag` option does allow for `null` to be returned if a
tag should not be created. The tokenizer previously didn't support
this, so the tokenizer should be able to handle this case. Previously
it would trigger an exception, because the tokenizer would pass back
a null value to the select function.
This also fixes what would have been a potential bug where even if a
tag was not created, the term would still have been sliced at the
location of the token. This allows for tokenizers to have special
cases when tokenizing the term, such as not splittting a token
if it is in the middle of a quoted string.
This closes https://github.com/select2/select2/issues/3593
This closes https://github.com/select2/select2/pull/3591
This fixes an issue where preventing the default behaviour on some
events would trigger an exception. This was bacause the event relay
was expecting there to always be an object passed in for arguments,
and this wasn't always the case.
This closes https://github.com/select2/select2/issues/3431.
This prevents selections from being removed when the container is
disabled. This stops any click events that are triggered on the
remove button, so the remove handler won't be triggered at all.
This closes https://github.com/select2/select2/pull/3636.