1
0
mirror of synced 2024-11-25 06:16:08 +03:00

Fixed allowClear on fixed width

This moves the clear icon to the top of the DOM from the bottom to
ensure that it is always visible on top of the selection.

This closes https://github.com/select2/select2/issues/3089.
This commit is contained in:
Kevin Brown 2015-03-11 21:28:06 -04:00
parent 78c301f4fb
commit e3d7cd2d69
7 changed files with 9 additions and 9 deletions

View File

@ -1226,7 +1226,7 @@ define('select2/selection/allowClear',[
); );
$remove.data('data', data); $remove.data('data', data);
this.$selection.find('.select2-selection__rendered').append($remove); this.$selection.find('.select2-selection__rendered').prepend($remove);
}; };
return AllowClear; return AllowClear;

View File

@ -1226,7 +1226,7 @@ define('select2/selection/allowClear',[
); );
$remove.data('data', data); $remove.data('data', data);
this.$selection.find('.select2-selection__rendered').append($remove); this.$selection.find('.select2-selection__rendered').prepend($remove);
}; };
return AllowClear; return AllowClear;

View File

@ -1,5 +1,5 @@
/*! /*!
* Select2 4.0.0-rc.1 - Thu, 12 Mar 2015 00:39:48 GMT * Select2 4.0.0-rc.1 - Thu, 12 Mar 2015 01:27:38 GMT
* https://select2.github.io * https://select2.github.io
* *
* Released under the MIT license * Released under the MIT license
@ -1672,7 +1672,7 @@ define('select2/selection/allowClear',[
); );
$remove.data('data', data); $remove.data('data', data);
this.$selection.find('.select2-selection__rendered').append($remove); this.$selection.find('.select2-selection__rendered').prepend($remove);
}; };
return AllowClear; return AllowClear;

File diff suppressed because one or more lines are too long

4
dist/js/select2.js vendored
View File

@ -1,5 +1,5 @@
/*! /*!
* Select2 4.0.0-rc.1 - Thu, 12 Mar 2015 00:39:48 GMT * Select2 4.0.0-rc.1 - Thu, 12 Mar 2015 01:27:38 GMT
* https://select2.github.io * https://select2.github.io
* *
* Released under the MIT license * Released under the MIT license
@ -1672,7 +1672,7 @@ define('select2/selection/allowClear',[
); );
$remove.data('data', data); $remove.data('data', data);
this.$selection.find('.select2-selection__rendered').append($remove); this.$selection.find('.select2-selection__rendered').prepend($remove);
}; };
return AllowClear; return AllowClear;

File diff suppressed because one or more lines are too long

View File

@ -64,7 +64,7 @@ define([
); );
$remove.data('data', data); $remove.data('data', data);
this.$selection.find('.select2-selection__rendered').append($remove); this.$selection.find('.select2-selection__rendered').prepend($remove);
}; };
return AllowClear; return AllowClear;