Skip to content

Commit 542d605

Browse files
committed
fix: 1827
1 parent c5e469c commit 542d605

File tree

9 files changed

+27
-17
lines changed

9 files changed

+27
-17
lines changed

dist/css/selectize.bootstrap3.css

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/selectize.js

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,15 @@
120120
}
121121
};
122122

123-
var IS_MAC = /Mac/.test(navigator.userAgent);
123+
function uaDetect(platform, re) {
124+
if (navigator.userAgentData) {
125+
return platform === navigator.userAgentData.platform;
126+
}
127+
128+
return re.test(navigator.userAgent);
129+
}
130+
131+
var IS_MAC = uaDetect("macOS", /Mac/);
124132

125133
var KEY_A = 65;
126134
var KEY_COMMA = 188;
@@ -143,7 +151,7 @@
143151
var TAG_INPUT = 2;
144152

145153
// for now, android support in general is too spotty to support validity
146-
var SUPPORTS_VALIDITY_API = !/android/i.test(window.navigator.userAgent) && !!document.createElement('input').validity;
154+
var SUPPORTS_VALIDITY_API = !uaDetect("Android", /android/i) && !!document.createElement('input').validity;
147155

148156

149157
var isset = function(object) {
@@ -821,7 +829,7 @@
821829
return '<div class="item">' + escape(data[field_label]) + '</div>';
822830
},
823831
'option_create': function(data, escape) {
824-
return '<div class="create">Add <strong>' + escape(data.input) + '</strong>&hellip;</div>';
832+
return '<div class="create">Add <strong>' + escape(data.input) + '</strong>&#x2026;</div>';
825833
}
826834
};
827835

@@ -3061,6 +3069,7 @@
30613069
}
30623070

30633071
instance = new Selectize($input, $.extend(true, {}, defaults, settings_element, settings_user));
3072+
instance.settings_user = settings_user;
30643073
});
30653074
};
30663075

@@ -3212,7 +3221,7 @@
32123221
'<div class="' + data.headerClass + '">' +
32133222
'<div class="' + data.titleRowClass + '">' +
32143223
'<span class="' + data.labelClass + '">' + data.title + '</span>' +
3215-
'<a href="javascript:void(0)" class="' + data.closeClass + '">&times;</a>' +
3224+
'<a href="javascript:void(0)" class="' + data.closeClass + '">&#xd7;</a>' +
32163225
'</div>' +
32173226
'</div>'
32183227
);
@@ -3230,6 +3239,7 @@
32303239

32313240
});
32323241

3242+
32333243
Selectize.define('optgroup_columns', function(options) {
32343244
var self = this;
32353245

@@ -3325,7 +3335,7 @@
33253335

33263336
Selectize.define('remove_button', function(options) {
33273337
options = $.extend({
3328-
label : '&times;',
3338+
label : '&#xd7;',
33293339
title : 'Remove',
33303340
className : 'remove',
33313341
append : true

dist/js/selectize.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/standalone/selectize.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/standalone/selectize.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/scss/selectize.bootstrap3.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ $select-shadow-input-error-focus: inset 0 1px 1px rgba(0, 0, 0, 0.075),
3434
$select-border: 1px solid $input-border;
3535
$select-border-radius: $input-border-radius;
3636

37-
$select-width-item-border: 0;
37+
$select-width-item-border: 0px;
3838
$select-padding-x: $padding-base-horizontal;
3939
$select-padding-y: $padding-base-vertical;
4040
$select-padding-dropdown-item-x: $padding-base-horizontal;

src/plugins/dropdown_header/plugin.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Plugin: "dropdown_header" (selectize.js)
33
* Copyright (c) 2013 Brian Reavis & contributors
44
* Copyright (c) 2020 Selectize Team & contributors
5-
*
5+
*
66
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
77
* file except in compliance with the License. You may obtain a copy of the License at:
88
* http://www.apache.org/licenses/LICENSE-2.0
@@ -30,7 +30,7 @@ Selectize.define('dropdown_header', function(options) {
3030
'<div class="' + data.headerClass + '">' +
3131
'<div class="' + data.titleRowClass + '">' +
3232
'<span class="' + data.labelClass + '">' + data.title + '</span>' +
33-
'<a href="javascript:void(0)" class="' + data.closeClass + '">&times;</a>' +
33+
'<a href="javascript:void(0)" class="' + data.closeClass + '">&#xd7;</a>' +
3434
'</div>' +
3535
'</div>'
3636
);
@@ -46,4 +46,4 @@ Selectize.define('dropdown_header', function(options) {
4646
};
4747
})();
4848

49-
});
49+
});

src/plugins/remove_button/plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
Selectize.define('remove_button', function(options) {
1919
options = $.extend({
20-
label : '&times;',
20+
label : '&#xd7;',
2121
title : 'Remove',
2222
className : 'remove',
2323
append : true

src/selectize.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ $.extend(Selectize.prototype, {
316316
return '<div class="item">' + escape(data[field_label]) + '</div>';
317317
},
318318
'option_create': function(data, escape) {
319-
return '<div class="create">Add <strong>' + escape(data.input) + '</strong>&hellip;</div>';
319+
return '<div class="create">Add <strong>' + escape(data.input) + '</strong>&#x2026;</div>';
320320
}
321321
};
322322

0 commit comments

Comments
 (0)