1
0
mirror of synced 2024-11-22 21:16:10 +03:00
Commit Graph

718 Commits

Author SHA1 Message Date
Eduardo Matos
22d503f846 Avoid call 'positionDropdown' function if the container it's closed 2014-04-15 10:51:23 -03:00
Eduardo Matos
3f43f459e9 Testing if the dropdown is opened before call positionDropdown, on events by resize, scroll and orientation 2014-04-11 14:02:11 -03:00
Kevin Brown
60d74da872 Merge pull request #2225 from davidfstr/fix_empty_placeholder
Allow an empty string to be used as the placeholder title.
2014-04-09 10:59:10 -04:00
Matthias Kurz
47005ede3a xhtml compatibility 2014-04-09 11:56:31 +02:00
Anthony Dmitriyev
c77e159178 Another solution for clicks triggered on underlying elements 2014-04-03 17:28:13 +03:00
Kevin Brown
0d06066331 Merge pull request #2238 from mkurz/focus-fix
Prevent the cursor from setting it to initial position in IE
2014-04-03 09:01:30 -04:00
Kevin Brown
e801573328 Merge pull request #2236 from mkurz/destroy_fix
.destroy() should destroy all selected select2
2014-04-03 08:47:46 -04:00
Kevin Brown
43a598b372 Merge pull request #2216 from lboynton/fix-search-focus-on-mobile
Fix search focus on mobile
2014-04-03 08:44:45 -04:00
Matthias Kurz
dcabde40c3 Prevent the cursor from setting it to initial position in IE 2014-04-03 12:19:37 +02:00
Matthias Kurz
ddcb61585a .destroy() should destroy all selected select2 2014-04-03 10:59:21 +02:00
David Foster
3ce3ad7fb0 Allow an empty string to be used as the placeholder title. 2014-04-01 14:22:41 -07:00
Lee Boynton
2d6b74c2ac Also check if search input should be focussed for multiselects 2014-03-31 21:01:06 +01:00
Lee Boynton
ed0bae39c9 Check if search should be focused when the dropdown is activated 2014-03-28 14:56:45 +00:00
Lee Boynton
ad21d01693 Check if search input should be focussed when opening 2014-03-28 14:46:41 +00:00
pineapple-thief
70873abe9d Update select2.js
Fixes unpleasant glitch where initializing select2 on select where first input option tag has non-breakable space in innerText causes selected option to be displayed as "undefined" until user changes selection. (i.e. HTML was like <option value>&nbsp;</option>, that's what Rails 3 f.select helper generate by default).
2014-03-28 15:45:38 +11:00
Kevin Brown
2752563c80 Merge pull request #2096 from springboardretail/mobile-fixes
make selection on iOS more intuitive
2014-03-21 20:36:40 -04:00
Kevin Brown
63f342a12f Revert "Add hideSelectionFromResult function"
This reverts commit 84cf134a4e.

New problems found in:
https://github.com/ivaynberg/select2/issues/2196

Original issue:
https://github.com/ivaynberg/select2/issues/1538

Pull request:
https://github.com/ivaynberg/select2/pull/2032
2014-03-21 19:50:30 -04:00
Diogo Trentini
6c731f4181 Fix method to get space above the dropdown
It's better to get the scrollTop value from window rather than body
to update enoughRoomAbove variable. This method is supported by
the main browsers.
2014-03-20 21:45:41 -03:00
Adam Schepis
eb09dfcce0 make selection on iOS more intuitive
allow touchend to cause selection of touched item.
Detect touchmove events so that selection of touched item can be canceled
2014-03-13 22:24:19 -04:00
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