Fixed multiple selection placeholders
Due to a change in 7edf0e3ebe700850a0f68c8c25f3381509d78f03 that made the rendered selection take up the full width of the selection container, the placeholder was not being automatically displayed. The calculations were always turning out negative, which has been fixed by not trying to automatically calculate the best possible width.
This commit is contained in:
parent
1191d4a3bb
commit
a6c4215976
6
dist/js/select2.amd.full.js
vendored
6
dist/js/select2.amd.full.js
vendored
@ -1211,11 +1211,7 @@ define('select2/selection/search',[
|
||||
var width = '';
|
||||
|
||||
if (this.$search.attr('placeholder') !== '') {
|
||||
width = this.$selection.innerWidth();
|
||||
width -= this.$selection.find('.select2-selection__rendered')
|
||||
.innerWidth();
|
||||
|
||||
width = width + 'px';
|
||||
width = this.$selection.find('.select2-selection__rendered').innerWidth();
|
||||
} else {
|
||||
var minimumWidth = this.$search.val().length + 1;
|
||||
|
||||
|
6
dist/js/select2.amd.js
vendored
6
dist/js/select2.amd.js
vendored
@ -1211,11 +1211,7 @@ define('select2/selection/search',[
|
||||
var width = '';
|
||||
|
||||
if (this.$search.attr('placeholder') !== '') {
|
||||
width = this.$selection.innerWidth();
|
||||
width -= this.$selection.find('.select2-selection__rendered')
|
||||
.innerWidth();
|
||||
|
||||
width = width + 'px';
|
||||
width = this.$selection.find('.select2-selection__rendered').innerWidth();
|
||||
} else {
|
||||
var minimumWidth = this.$search.val().length + 1;
|
||||
|
||||
|
6
dist/js/select2.full.js
vendored
6
dist/js/select2.full.js
vendored
@ -10746,11 +10746,7 @@ define('select2/selection/search',[
|
||||
var width = '';
|
||||
|
||||
if (this.$search.attr('placeholder') !== '') {
|
||||
width = this.$selection.innerWidth();
|
||||
width -= this.$selection.find('.select2-selection__rendered')
|
||||
.innerWidth();
|
||||
|
||||
width = width + 'px';
|
||||
width = this.$selection.find('.select2-selection__rendered').innerWidth();
|
||||
} else {
|
||||
var minimumWidth = this.$search.val().length + 1;
|
||||
|
||||
|
2
dist/js/select2.full.min.js
vendored
2
dist/js/select2.full.min.js
vendored
File diff suppressed because one or more lines are too long
6
dist/js/select2.js
vendored
6
dist/js/select2.js
vendored
@ -1639,11 +1639,7 @@ define('select2/selection/search',[
|
||||
var width = '';
|
||||
|
||||
if (this.$search.attr('placeholder') !== '') {
|
||||
width = this.$selection.innerWidth();
|
||||
width -= this.$selection.find('.select2-selection__rendered')
|
||||
.innerWidth();
|
||||
|
||||
width = width + 'px';
|
||||
width = this.$selection.find('.select2-selection__rendered').innerWidth();
|
||||
} else {
|
||||
var minimumWidth = this.$search.val().length + 1;
|
||||
|
||||
|
4
dist/js/select2.min.js
vendored
4
dist/js/select2.min.js
vendored
File diff suppressed because one or more lines are too long
6
src/js/select2/selection/search.js
vendored
6
src/js/select2/selection/search.js
vendored
@ -118,11 +118,7 @@ define([
|
||||
var width = '';
|
||||
|
||||
if (this.$search.attr('placeholder') !== '') {
|
||||
width = this.$selection.innerWidth();
|
||||
width -= this.$selection.find('.select2-selection__rendered')
|
||||
.innerWidth();
|
||||
|
||||
width = width + 'px';
|
||||
width = this.$selection.find('.select2-selection__rendered').innerWidth();
|
||||
} else {
|
||||
var minimumWidth = this.$search.val().length + 1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user