1
0
mirror of synced 2024-11-26 06:46:04 +03:00

keep focus in control when the mask is clicked

This commit is contained in:
Igor Vaynberg 2013-05-06 20:05:15 -07:00
parent 4094c1c7de
commit 882e7996f4

View File

@ -1224,6 +1224,8 @@ the specific language governing permissions and limitations under the Apache Lic
self.selectHighlighted({noFocus: true});
}
self.close();
e.preventDefault();
e.stopPropagation();
}
});
}
@ -1884,6 +1886,7 @@ the specific language governing permissions and limitations under the Apache Lic
})).bind("blur", this.bind(function() {
if (!this.opened()) {
this.container.removeClass("select2-container-active");
this.opts.element.trigger($.Event("select2-blur"));
}
}));
this.search.bind("focus", this.bind(function(){
@ -2382,6 +2385,7 @@ the specific language governing permissions and limitations under the Apache Lic
this.selectChoice(null);
if (!this.opened()) this.clearSearch();
e.stopImmediatePropagation();
this.opts.element.trigger($.Event("select2-blur"));
}));
this.container.delegate(selector, "mousedown", this.bind(function (e) {