This will make it easier in the future to test that we support labels,
and it tells people who are looking to confirm that we support labels
that we in fact do.
This adds basic support for focusing the Select2 element by triggering
the `focus` event on the underlying <select> element. This implicitly
adds support for <label> elements, which will trigger the `focus` event
on the `<select>` if it is clicked.
This also fixes the focus issue that previously existed if Select2 was
opened while in a <label>. The focus would be transferred to the search
dropdown, and then immediately pulled away to the <select> element. This
happened because the <label> element triggers the `focus` event when a
`click` event propagates its way up, and we do not stop the propagation
of the `click` event when it is triggered on the selection.
This closes https://github.com/select2/select2/issues/2311.
This closes https://github.com/select2/select2/issues/4203.
This closes https://github.com/select2/select2/pull/4235.
These tests did not cover the classes that should have been
automatically applied to the dropdown based on the space around it. Now
they both test that the dropdown should be facing down, because there is
enough space below it to display the dropdown.
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.