1
0
mirror of synced 2024-11-23 05:26:10 +03:00

Only select the first suitable item if nothing is already selected

This commit is contained in:
Brendan Heywood 2012-11-01 18:00:38 +10:00
parent 291f595a03
commit 6c59b1e99c

View File

@ -2166,7 +2166,7 @@ the specific language governing permissions and limitations under the Apache Lic
}
});
if (this.opts.closeOnSelect){
if (this.highlight() == -1){
choices.each2(function (i, choice) {
if (!choice.hasClass("select2-disabled") && choice.hasClass("select2-result-selectable")) {
self.highlight(0);