Skip to content

fix: #1827 #1829

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dist/css/selectize.bootstrap3.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 15 additions & 5 deletions dist/js/selectize.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,15 @@
}
};

var IS_MAC = /Mac/.test(navigator.userAgent);
function uaDetect(platform, re) {
if (navigator.userAgentData) {
return platform === navigator.userAgentData.platform;
}

return re.test(navigator.userAgent);
}

var IS_MAC = uaDetect("macOS", /Mac/);

var KEY_A = 65;
var KEY_COMMA = 188;
Expand All @@ -143,7 +151,7 @@
var TAG_INPUT = 2;

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


var isset = function(object) {
Expand Down Expand Up @@ -821,7 +829,7 @@
return '<div class="item">' + escape(data[field_label]) + '</div>';
},
'option_create': function(data, escape) {
return '<div class="create">Add <strong>' + escape(data.input) + '</strong>&hellip;</div>';
return '<div class="create">Add <strong>' + escape(data.input) + '</strong>&#x2026;</div>';
}
};

Expand Down Expand Up @@ -3061,6 +3069,7 @@
}

instance = new Selectize($input, $.extend(true, {}, defaults, settings_element, settings_user));
instance.settings_user = settings_user;
});
};

Expand Down Expand Up @@ -3212,7 +3221,7 @@
'<div class="' + data.headerClass + '">' +
'<div class="' + data.titleRowClass + '">' +
'<span class="' + data.labelClass + '">' + data.title + '</span>' +
'<a href="javascript:void(0)" class="' + data.closeClass + '">&times;</a>' +
'<a href="javascript:void(0)" class="' + data.closeClass + '">&#xd7;</a>' +
'</div>' +
'</div>'
);
Expand All @@ -3230,6 +3239,7 @@

});


Selectize.define('optgroup_columns', function(options) {
var self = this;

Expand Down Expand Up @@ -3325,7 +3335,7 @@

Selectize.define('remove_button', function(options) {
options = $.extend({
label : '&times;',
label : '&#xd7;',
title : 'Remove',
className : 'remove',
append : true
Expand Down
2 changes: 1 addition & 1 deletion dist/js/selectize.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/standalone/selectize.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/standalone/selectize.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/scss/selectize.bootstrap3.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ $select-shadow-input-error-focus: inset 0 1px 1px rgba(0, 0, 0, 0.075),
$select-border: 1px solid $input-border;
$select-border-radius: $input-border-radius;

$select-width-item-border: 0;
$select-width-item-border: 0px;
$select-padding-x: $padding-base-horizontal;
$select-padding-y: $padding-base-vertical;
$select-padding-dropdown-item-x: $padding-base-horizontal;
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/dropdown_header/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Plugin: "dropdown_header" (selectize.js)
* Copyright (c) 2013 Brian Reavis & contributors
* Copyright (c) 2020 Selectize Team & contributors
*
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at:
* http://www.apache.org/licenses/LICENSE-2.0
Expand Down Expand Up @@ -30,7 +30,7 @@ Selectize.define('dropdown_header', function(options) {
'<div class="' + data.headerClass + '">' +
'<div class="' + data.titleRowClass + '">' +
'<span class="' + data.labelClass + '">' + data.title + '</span>' +
'<a href="javascript:void(0)" class="' + data.closeClass + '">&times;</a>' +
'<a href="javascript:void(0)" class="' + data.closeClass + '">&#xd7;</a>' +
'</div>' +
'</div>'
);
Expand All @@ -46,4 +46,4 @@ Selectize.define('dropdown_header', function(options) {
};
})();

});
});
2 changes: 1 addition & 1 deletion src/plugins/remove_button/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

Selectize.define('remove_button', function(options) {
options = $.extend({
label : '&times;',
label : '&#xd7;',
title : 'Remove',
className : 'remove',
append : true
Expand Down
2 changes: 1 addition & 1 deletion src/selectize.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ $.extend(Selectize.prototype, {
return '<div class="item">' + escape(data[field_label]) + '</div>';
},
'option_create': function(data, escape) {
return '<div class="create">Add <strong>' + escape(data.input) + '</strong>&hellip;</div>';
return '<div class="create">Add <strong>' + escape(data.input) + '</strong>&#x2026;</div>';
}
};

Expand Down