Commit edb93954 authored by David Stutz's avatar David Stutz

Reverting #587 as it screws up single selection user experience.

parent f812c3e2
......@@ -1171,7 +1171,7 @@
var justVisible = typeof justVisible === 'undefined' ? true : justVisible;
if(justVisible) {
var visibleCheckboxes = $("li input:not(:disabled)", this.$ul).filter(":visible");
var visibleCheckboxes = $("li input[type='checkbox']:not(:disabled)", this.$ul).filter(":visible");
visibleCheckboxes.prop('checked', false);
var values = visibleCheckboxes.map(function() {
......@@ -1187,7 +1187,7 @@
}
}
else {
$("li input:enabled", this.$ul).prop('checked', false);
$("li input[type='checkbox']:enabled", this.$ul).prop('checked', false);
$("option:enabled", this.$select).prop('selected', false);
if (this.options.selectedClass) {
......
......@@ -256,6 +256,10 @@ describe('Bootstrap Multiselect "Single Selection"', function() {
});
});
it('Deselect all should work.', function() {
expect($('#multiselect option:selected').length).toBe(1);
});
afterEach(function() {
$('#multiselect').multiselect('destroy');
$('#multiselect').remove();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment