Matt Slocum
2342d91925
Fix Focus war with modals
...
Bootstrap modal (and maybe others) require focus to maintain in the modal (because that what a modal is). The dropdown is outside of the modal, so we need to stopPropagation on the event so the modal doesn't know.
2014-03-11 12:14:17 -06:00
Kevin Brown
2d906ee10f
Merge pull request #2140 from ivaynberg/issue_1541
...
Add `shouldFocusInput` option [Fix #1541 ]
2014-03-07 10:14:32 -05:00
Kevin Brown
51e5d436ff
Merge pull request #2160 from s7anley/bugfix/2073-select2-removing
...
Multiselect items are not removed when event is prevented
2014-03-07 10:12:01 -05:00
Kevin Brown
e6fbfcd101
Merge pull request #2125 from colemanw/evaluateFix
...
Fix evaluation of formatLoadMore
2014-03-05 20:57:43 -05:00
Ján Koščo
f3c6d6d51f
After prevented removing of item in multiselect, proper item is focused
2014-03-05 11:27:08 +01:00
Ján Koščo
86a9c79b04
Removed unnecessary animation during unseint multiselect by close button
2014-03-05 11:27:03 +01:00
Ján Koščo
2059b5d4d3
Unselected item is returned as options only if event isn't prevented
2014-03-05 11:26:50 +01:00
dhardtke
60359f9d43
fix select2 csp errors / warnings
2014-02-27 20:07:57 +01:00
Kevin Brown
d87e93dd45
Add shouldFocusInput
option [ Fix #1541 ]
...
This adds a `shouldFocusInput` option that determines whether or
not the focusser should be automatically focused. By default, the
focusser will always be focused, unless `minimumResultsForSearch`
is less than zero.
`close` on single selects took an option `params` argument which
at one point was used to tell the focusser to not automatically
focus. This was added at one point when tweaking the mask [1]
and later reverted to fix a bug that came as a result [2]. The
leftovers of this code has been removed in this commit.
[1]: e162a4802c
[2]: 9bc68f089e
2014-02-21 20:06:21 -05:00
Pete Campbell
2a4e026b49
Bugfix - only selected options that are not disabled should be used when initializing the dropdown
2014-02-17 21:16:26 -05:00
Coleman Watts
9460b0c9b6
Fix evaluation of formatLoadMore
2014-02-14 17:14:12 -08:00
Kevin Brown
3c28c35503
Merge pull request #2095 from mkurz/readonly_chaining
...
Allow chaining for .select2('readonly', ...)
2014-02-03 15:46:53 -08:00
Matthias Kurz
bd3bd55719
Allow chaining for .select2('readonly', ...)
2014-02-03 16:07:23 +01:00
Coleman Watts
175c78441f
Accept strings as well as functions for localization
2014-01-31 21:04:36 -08:00
Jeanmonod David
ed77cab7d5
Allow to display item created by createSearchChoice at the end of the list
...
ref #595
2014-01-24 18:54:56 +01:00
jdecuyper
c87615f14c
The function hideSelectionFromResult was tested against undefined as a property and not as a function
2014-01-21 11:45:13 -06:00
Kevin Brown
0f1372ce72
Merge pull request #1733 from flyerhzm/append-label-only-when-formatted-defined
...
append label only when formatted is not undefined
2014-01-21 05:49:36 -08:00
Marchenko Alexandr
89ae701691
merge
2014-01-21 12:17:58 +02:00
Marchenko Alexandr
2e901f79a1
merge
2014-01-21 11:54:48 +02:00
Kevin Brown
e559f92c35
Merge pull request #2001 from arendjr/master
...
Don't rely on :visible and :not(..., ...) selectors which only work with Sizzle
2014-01-20 16:48:27 -08:00
Marchenko Alexandr
f4886a0afa
Optional Search Input Placeholder parameter added
2014-01-20 11:38:33 +02:00
jdecuyper
84cf134a4e
Add hideSelectionFromResult function
2014-01-19 21:12:39 -06:00
Tim Robertson
eaf09c7f76
Accessibility updates based on jQuery UI Autocomplete
2014-01-19 18:52:56 -05:00
Sebastian Kather
48d392635f
singleSelect: setting nextSearchTerm in initSelection
...
For single select the nextSearchTerm callback is called when
initSelection returned data
2014-01-16 16:12:00 +01:00
Steven Armstrong
829b8c7346
Changed default text for min number of characters.
...
Use to read:
Please enter 3 more characters.
Now reads:
Please enter 3 or more characters.
2014-01-13 10:01:30 -05:00
Jonathan Potter
4dce487ccb
Prevent IE from generating unwanted clicks on the body. When mousedown fires on the selection element and then mouseup fires on the mask (because it is moved under the mouse during mousedown) then IE fires a click event on the body because it is the closest common ancestor. To prevent this, we detach and reatach the elements on mousedown which cancels the click event.
2014-01-09 11:30:48 -05:00
Igor Vaynberg
3e5ad1334e
Merge pull request #2020 from merkuriy/master
...
L10n files improved
2014-01-08 15:05:23 -08:00
pj
c22bdd41a0
Removed hardcoded class names from $.fn.select2. The code now uses the exports accessible through window.Select2 to instantiate widgets, allowing the environment to replace or extend those classes globally.
2014-01-08 18:09:14 +02:00
pj
41c3d4cfc4
Removed hardcoded class names from $.fn.select2. The code now uses the exports accessible through window.Select2 to instantiate widgets, allowing the environment to replace or extend those classes globally.
2014-01-08 17:56:23 +02:00
Uriy Efremochkin
fd97e585d7
L10n files and template l10n file were improved: Groups of three characters "." (dots) were replaced by a single character "…" (ellipsis).
2014-01-08 15:35:47 +06:00
Kevin Brown
4eb1370b9c
Merge pull request #1981 from openwide-java/fix-1946-hard_coded_title
...
Fix #1946 : remove an hard coded title attribute.
2014-01-06 18:01:47 -08:00
jdecuyper
c7dd8c5179
Enable nextSearchTerm function for multiple select
2013-12-31 12:01:48 -06:00
Arend van Beelen
a6ec8fc4e1
Don't rely on :visible and :not(..., ...) selectors which only work with Sizzle.
2013-12-30 15:33:46 +01:00
jibwa
92357e61b8
Fix problem with positioning the dropdown when it is on the right hand side of view
...
In the stable version this line looks like:
dropLeft = offset.left + width - dropWidth;
In line (1193) the variable width is set to dropWidth which means we are always going to end up with
dropLeft = offset.left + X - X
or
dropLeft = offset.left
Which means we are still aligned to the left of the button.
This current solution from @ef9f1dea is just aligning the select2-drop closer to the center which is not what it did before the dropdownAutoWidth.
The line I submitted worked perfect and my dropdown now aligns to the RHS of the button again as expected.
2013-12-18 16:28:40 -05:00
Guillaume Smet
3d2b91bd7a
Fix #1946 : remove an hard coded title.
...
The original title is copied if defined and it's sufficient for accessibility purpose.
We shouldn't force the title attribute, it's especially annoying if people are using
tooltip implementation based on the title attribute such as Bootstrap tooltip.
2013-12-17 17:03:10 +01:00
Igor Vaynberg
c186dc826e
better handling for ipads. fixes #1949
2013-12-03 10:21:17 -08:00
Lito
abe7777b0a
Fixed string used as regular expression for ID attribute.
...
Signed-off-by: Igor Vaynberg <igor.vaynberg@gmail.com>
2013-12-03 08:32:27 -08:00
Igor Vaynberg
fc5ac5b137
Merge pull request #1728 from corinnaerin/master
...
Compatibility with jQuery 1.9 +
2013-11-29 22:49:06 -08:00
Igor Vaynberg
f8dda91171
Merge pull request #1014 from sjschukin/patch-1
...
.select2("data", null) causes an error
2013-11-29 22:40:52 -08:00
Igor Vaynberg
aa0fb730aa
Merge pull request #1938 from datapad/data-result-direct-children
...
Only pick up direct children when retrieving data in 'multiple' mode
2013-11-29 22:24:32 -08:00
Igor Vaynberg
816a46bf1a
Merge pull request #1940 from datapad/reset-filtered-dropdown
...
Fix dropdown items not being reset after filtering and selecting when `closeOnSelect` is `false`
2013-11-29 22:24:05 -08:00
Alek Storm
b5aa4688ea
Fix dropdown items not being reset after filtering and selecting when closeOnSelect is false
2013-11-27 17:24:11 -06:00
Alek Storm
e7bd3a3779
Only pick up direct children when retrieving data in 'multiple' mode:
...
Prevents accidentally returning the selected items of any select2's embedded in the HTML of
this selection's items.
2013-11-27 17:17:15 -06:00
riatiger
50f813c003
fix for Uncaught TypeError
...
Prevents "Uncaught TypeError: Object #<Object> has no method 'abort'"
error for case when non-jQuery promise is used as a handler (AngularJS
$promise for example).
2013-11-21 19:58:01 +02:00
Igor Vaynberg
0967c67776
Merge pull request #1865 from pborreli/typos
...
Fixed typos
2013-11-14 08:24:38 -08:00
Jake
ef9f1dea90
Fix for drop-auto-width collision detection and css border top
...
- collision detection was not moving the drop left based on the
difference between viewport and relative location of box (dropleft +
dropwidth)
- .select2-drop-active was overriding the .select2-drop-auto-width
making the shifted dropbox look a bit wierd
2013-11-07 16:21:52 -05:00
Igor Vaynberg
cb5b684ae5
Merge pull request #1887 from lukinpark/patch-1
...
Update select2.js
2013-11-07 10:09:07 -08:00
Igor Vaynberg
50698fd51c
Merge pull request #1685 from jdecuyper/feature-enable-formatResultCssClass
...
Enable function formatResultCssClass.
2013-11-07 09:51:38 -08:00
Igor Vaynberg
fc4bbbb5ef
Merge pull request #1846 from tpruvot/master
...
issue #1778 : prevent delayed focus when the list is hidden
2013-11-07 07:40:45 -08:00
lukinpark
85de8cc1d6
Update select2.js
...
above function doesn't work great
2013-11-07 11:45:05 +01:00