1
0
mirror of synced 2025-02-04 06:09:23 +03:00

Explicitly require jquery-mousewheel now

This fixes the implicit requirement of jquery-mousewheel that previously
existed. This was not allowed, as pointed out in
https://github.com/select2/select2/issues/3287#issuecomment-120408092

Now the requirement is more explicit, so everything should work as it
was before.
This commit is contained in:
Kevin Brown 2015-11-27 16:03:26 -05:00
parent 8edf3c6408
commit 32b6eae54b

View File

@ -1,13 +1,10 @@
define([
'jquery',
'require',
'jquery-mousewheel',
'./select2/core',
'./select2/defaults'
], function ($, require, Select2, Defaults) {
// Force jQuery.mousewheel to be loaded if it hasn't already
require('jquery.mousewheel');
], function ($, _, Select2, Defaults) {
if ($.fn.select2 == null) {
// All methods that should return the element
var thisMethods = ['open', 'close', 'destroy'];