1
0
mirror of synced 2025-02-17 04:23:15 +03:00

Merge pull request #541 from brendanheywood/master

Fixed bug with closeOnSelecet is false
This commit is contained in:
Igor Vaynberg 2012-11-02 08:57:15 -07:00
commit aa686aa47e

View File

@ -1088,7 +1088,7 @@ the specific language governing permissions and limitations under the Apache Lic
y = child.offset().top - results.offset().top;
// make sure the top of the element is visible
if (y < 0) {
if (y < 0 && child.css('display') != 'none' ) {
results.scrollTop(results.scrollTop() + y); // y is negative
}
},
@ -2166,12 +2166,14 @@ the specific language governing permissions and limitations under the Apache Lic
}
});
choices.each2(function (i, choice) {
if (!choice.hasClass("select2-disabled") && choice.hasClass("select2-result-selectable")) {
self.highlight(0);
return false;
}
});
if (this.highlight() == -1){
choices.each2(function (i, choice) {
if (!choice.hasClass("select2-disabled") && choice.hasClass("select2-result-selectable")) {
self.highlight(0);
return false;
}
});
}
},