1
0
mirror of synced 2024-11-26 06:46:04 +03:00
Commit Graph

762 Commits

Author SHA1 Message Date
Cameron Spear
0675805621 Fix error: Cannot read property 'top' of undefined
Lines [1499](d487fc58a8/select2.js (L1499)) and [1509](d487fc58a8/select2.js (L1509)) make a call to `child.offset().top`. I don't know what's causing `child.offset()` to return undefined, but it is and it's breaking Select2 so that I can't select the last item in the list (this error occurs when I try hovering over or clicking on the last item in a list).

I can try and create a reduced case, but this fix is 100% backward compatibe, passes all the tests you have for the project and has a 0% chance of breaking anyone's working code. With this patch, my dropdown works just fine. At worst, this does *nothing* for people, at best, it fixes a rare edge case. Like my edge case. And I'm a pretty important person to me.
2014-06-06 19:04:14 -07:00
Kevin Brown
d487fc58a8 Merge pull request #2360 from ycdtosa/master
changes on updateResults, populate by @cervengoc on #781
2014-05-27 19:09:38 -04:00
Kevin Brown
f544f9d9ab Merge pull request #2367 from gschizas/master
Added Greek accented characters to ignorable diacritics
2014-05-27 18:56:07 -04:00
Kevin Brown
fba74e3ccd Merge pull request #2363 from thereloaded/master
query as third parameter to ajax results callback
2014-05-27 16:50:52 -04:00
Braden M. Kelley
88c6a63937 IE8 does not support Array.prototype.forEach #2339 2014-05-23 10:29:25 -07:00
Cyril Nicodème
02d6e88747 Update select2.js
Fix an exception when called "destroy" on a still opened dropdown.
2014-05-20 09:30:35 +02:00
TheSisb
e2cd841fe8 Handling mousemove more delicately
Mousemove fires very frequently and is a sure way of killing any app's FPS.  This tweak makes sure it is only bound when it is in fact needed.
2014-05-14 15:25:05 -07:00
George Schizas
827a549ba8 Reverted formatting of diacritics variable, now is again in one line 2014-05-13 17:11:14 +03:00
George Schizas
68c64a1129 Enabled Greek for diacritics ignoring 2014-05-13 17:05:46 +03:00
George Schizas
df43e1a1ec fixed word wrapping for DIACRITICS variable 2014-05-13 16:59:41 +03:00
ycdtosa
0f8a85b994 update populate at formatResults to use bulk append of nodes
this will make a small (25%) improvement on speed.
2014-05-13 12:27:52 +02:00
ycdtosa
c14f45cb6c Revert "changes on updateResults, populate by @cervengoc on #781"
This reverts commit 12e0de21ae.
2014-05-13 09:54:00 +02:00
thereloaded
49a86e21ed added query to function head jsdoc block 2014-05-13 09:34:16 +02:00
thereloaded
f07bab5a6b query as third parameter to ajax results callback
for e.g. proper cache implementation it is necessary to have the complete query in the results callback of the ajax function. to not break backwards compatibility i added it as third parameter and did not replace query.page parameter
2014-05-12 19:35:59 +02:00
ycdtosa
12e0de21ae changes on updateResults, populate by @cervengoc on #781
use string concatenation instead of DOM manipulation at populate. This
does gives about a 45% speed boost as measured with chrome v35. Code by
@cervengoc on #781
2014-05-12 11:39:54 +02:00
Kevin Brown
c864392ffb Merge pull request #2326 from dawnhammond/feature/2084
Fix issue with dropdown menu getting stuck in IE when using multiselect
2014-05-05 19:23:36 -04:00
Braden M. Kelley
2133129a74 keyword this inside closures referring to wrong object 2014-05-01 08:54:32 -07:00
Kevin Brown
ea3c6766a2 Merge pull request #2164 from colemanw/evaluateFix
Provide context for evaluated functions
2014-05-01 10:08:42 -04:00
Kevin Brown
988eccb557 Merge pull request #2332 from FallSe7en/master
Unbind onpropertychange event handler on destroy for IE8-10
2014-05-01 10:05:20 -04:00
Kevin Brown
fb6ef71ba0 Merge pull request #2337 from snrmwg/master
Query term in tags function in select2 3.4 #2141
2014-05-01 09:44:34 -04:00
Marc Schneider
ca859e4e42 Query term in tags function in select2 3.4 #2141 2014-05-01 15:35:32 +02:00
Justin Lei
0313630c57 Unbind onpropertychange event handler on destroy for IE8-10 2014-04-29 17:08:23 -07:00
Dawn Hammond
796661a11d change condition to use length 2014-04-28 16:49:08 -05:00
Dawn Hammond
e3751422f0 Fix focus issue when select-input has placeholder 2014-04-28 14:15:50 -05:00
marek
97b897abe0 Set id in unescaped version. 2014-04-28 13:12:28 +02:00
marek
3c1482ae45 Replace dots with underscores in event handler names. Dots are processed in special way in jQuery on/off. 2014-04-28 12:59:17 +02:00
Kevin Brown
8b463bff14 Merge pull request #2287 from eduardojmatos/master
Testing if the dropdown is opened before call positionDropdown
2014-04-26 19:28:59 -04:00
Kevin Brown
1c7706ad9e Merge pull request #2307 from IFours/master
Recalculation dropdown height if dropdownAutoWidth is true
2014-04-26 16:16:45 -04:00
Kevin Brown
9e505cdf27 Merge pull request #2313 from FallSe7en/master
Cleanup jQuery DOM elements on destroy
2014-04-26 15:59:47 -04:00
Kevin Brown
6b689fc4e0 Merge pull request #2302 from ivaynberg/issue_1541
Only disable keyboard focusing for touch devices
2014-04-26 15:46:26 -04:00
Justin Lei
f9be3c039c Issue 234368 for the Chromium project is fixed now (Issue #1099) 2014-04-23 17:22:58 -07:00
Justin Lei
6156abc2a8 Cleanup jQuery DOM elements on destroy 2014-04-23 17:14:13 -07:00
Kevin Brown
2e79f5eb4f Only disable keyboard focusing for touch devices [Fixes #1541]
This fixes the issue [1] by first checking to see if the current
device is a touch device.  The other issue [2] that occured because
of the original fix [3] is now fixed, because the hidden inputs
are always focused by default on non-touch devices.

The code used for detecting touch devices was pulled from
StackOverflow [4].  Information on the reasoning behind this fix
can be found on GitHub [5].

[1]: https://github.com/ivaynberg/select2/issues/1541
[2]: https://github.com/ivaynberg/select2/issues/2223
[3]: d87e93dd45
[4]: http://stackoverflow.com/a/15439809/359284
[5]: https://github.com/ivaynberg/select2/issues/1541#issuecomment-39805859
2014-04-22 20:25:19 -04:00
IliaFours
ffddc48a24 Recalculation dropdown height if dropdownAutoWidth is true 2014-04-22 14:54:36 +03:00
Marc Schneider
42f2acd0aa Query term in tags function in select2 3.4 #2141 2014-04-21 00:18:19 +02:00
Kevin Brown
79e031fbdf Merge pull request #2241 from zocoi/master
Trap touch events within container
2014-04-18 18:52:40 -04:00
jorupp
632595f530 Fix issue syncing CSS classes in IE9/10 2014-04-15 16:36:24 -05:00
Eduardo Matos
22d503f846 Avoid call 'positionDropdown' function if the container it's closed 2014-04-15 10:51:23 -03:00
interestincode
7c9c9612b5 Update select2.js
As suggested in https://github.com/ivaynberg/select2/issues/781#issuecomment-38979100, significantly improves search speed, going from unusable to snappy on IE on a list of almost 10,000 items with a custom query limiting it to 25 results. Uses 'uni range + named function' from http://jsperf.com/diacritics/18
2014-04-15 02:08:16 -07:00
Kevin Brown
24f4bbfefb Merge pull request #2257 from mkurz/title_fix
Copy title attribute from original element
2014-04-14 22:05:37 -04:00
Kevin Brown
f48df6f369 Merge pull request #2153 from 2color/patch-1
Fix a typo in the docs.
2014-04-14 21:30:47 -04: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
bdb8840fb4 Copy title attribute from original element 2014-04-09 12:36:43 +02:00
Matthias Kurz
47005ede3a xhtml compatibility 2014-04-09 11:56:31 +02:00
Hung Dao
534bbff06f trap touchstart touchend events within container 2014-04-03 17:06:08 -07: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