Lines Matching defs:focus

262     function focus($el) {
265 /* set the focus in a 0 timeout - that way the focus is set after the processing
267 to set focus */
271 $el.focus();
273 /* make sure el received focus so we do not error out when trying to manipulate the caret.
278 /* after the focus is set move the caret to the end, necessary when we val()
279 just before setting focus */
301 el.focus();
766 search.on("focus", function () { search.addClass("select2-focused"); });
779 // focusin can cause focus wars between modals and select2 since the dropdown is outside the modal.
810 if (this.autofocus) this.focus();
1762 // synonymous to .is(':focus'), which is available in jquery >= 1.6
1765 this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");
1770 focus(this.search);
1918 this.search.focus();
1953 this.focusser.focus();
1958 focus: function () {
1964 this.focusser.focus();
1980 this.focusser.focus();
2069 // without this the search field loses focus which is annoying
2073 this.search.focus();
2125 this.selection.focus();
2133 this.opts.element.trigger($.Event("select2-focus"));
2145 dropdown.on("mousedown touchstart", this.bind(function() { this.search.focus(); }));
2147 selection.on("focus", this.bind(function(e) {
2151 this.focusser.on("focus", this.bind(function(){
2153 this.opts.element.trigger($.Event("select2-focus"));
2162 this.search.on("focus", this.bind(function(){
2164 this.opts.element.trigger($.Event("select2-focus"));
2355 this.focusser.focus();
2554 var selected = this.container.find(".select2-search-choice-focus");
2561 selected.removeClass("select2-search-choice-focus");
2564 choice.addClass("select2-search-choice-focus");
2588 _this.search[0].focus();
2613 var selected = selection.find(".select2-search-choice-focus");
2730 this.opts.element.trigger($.Event("select2-focus"));
2737 this.container.on("focus", selector, this.bind(function () {
2740 this.opts.element.trigger($.Event("select2-focus"));
2824 this.search.focus();
2835 focus: function () {
2837 this.search.focus();
2969 this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");
2973 })).on("focus", this.bind(function () {
3260 allowedMethods = ["val", "destroy", "opened", "open", "close", "focus", "isFocused", "container", "dropdown", "onSortStart", "onSortEnd", "enable", "disable", "readonly", "positionDropdown", "data", "search"],
3361 // Never focus the input if search is disabled