Previously the tokenizer only worked when creating multiple options
at once if all of the options existed. It always worked when creating
a single option, because all of the special cases were handled by the
tagging module. When working with multiple options, the tagging
module does not kick in until after the query has been run, which
is when the tokenizer does its magic.
This fixes the issue by automatically creating the option tags that
the tagging module would normally create. It only does this if the
options do not already exist, so we don't need to worry about the
tokenizer creating duplicates of existing options.
This closes https://github.com/select2/select2/issues/3458
The error handler should not be raised if a request is aborted while
another one is sent out. This attempts to detect those cases by
handling the case where the error was raised and the request has a
status code of 0, which should either mean we're in offline mode or
the request was aborted.
This closes https://github.com/select2/select2/issues/4205
Previously the `dropdownAutoWidth` option didn't work because the
dropdown was being absolutely positioned, so setting the width to
`auto` didn't actually have an effect. This cannot be solved by
just setting the width on the container, because that is also
absolutely positioned.
This closes https://github.com/select2/select2/issues/3101
This fixes an issue that has existed since Select2 4.0.1 where the
arguments passed into each `<select>` were mutated. This no longer
mutates the arguments for each element, and instead only drops the
first argument once.
This closes https://github.com/select2/select2/issues/4245
- updated transaltions
- added translation for errorLoading
- issue fixes - compare characters length instead of message when adding terminal character
This closes https://github.com/select2/select2/pull/4208
The issue template is largely based on the questions included in the
canned comment that I use for bugs, which is mostly covered in the
contributing guide. Even though there are a lot of lines, most of it is
just ticking checkboxes.
The issue template is focused on bug reports, as those are considerably
more common than feature requests.
The pull request template was designed to be pretty slim, we haven't had
many issues with these in the past.
This fixes some bugs that were present in the old Prettify highlighter
when there was a mix of JavaScript and HTML in the same code block. Now
with Rouge, the highlighter used by Jekyll, these cases are properly
handled and HTML no longer looks strange.
This does not convert all of the code blocks over, because there are
still some code blocks which double as the actual JavaScript code
powering the example that need to be migrated.
We previously used Google's Prettify, which worked on the client side.
Now that we are actually using Jekyll, and it has built-in syntax
highlighting, we might as well change to doing highlighting on the
backend.
Use of protocol-relative URLs is now seen as an anti-pattern as it leaves the door open to attacks. As the CDNs serve over HTTPS it should be recommended that people use HTTPS rather than protocol-relative URLs. See Paul Irish's post on [Protocol-relative URLs](http://www.paulirish.com/2010/the-protocol-relative-url/) for more details.
This adds more code examples where they might be useful, and adds some
more description where it was needed. This clarifies a couple of the
questions that have come up about the AMD support and links to the bug
that Select2 was involved with that some people reported when 4.0.0 was
released.
This display the `errorLoading` translation when there is an error
during the AJAX cycle. Previously we were just throwing these errors
out, now we are actually displaying an error message.
This closes https://github.com/select2/select2/issues/3501