Merge pull request #2846 from colemanw/patch-2
Fix bug where elements in select2 drop cannot be focused
This commit is contained in:
commit
3a10bd997a
@ -2188,7 +2188,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||||||
// without this the search field loses focus which is annoying
|
// without this the search field loses focus which is annoying
|
||||||
if (document.activeElement === this.body.get(0)) {
|
if (document.activeElement === this.body.get(0)) {
|
||||||
window.setTimeout(this.bind(function() {
|
window.setTimeout(this.bind(function() {
|
||||||
if (this.opened()) {
|
if (this.opened() && this.results && this.results.length > 1) {
|
||||||
this.search.focus();
|
this.search.focus();
|
||||||
}
|
}
|
||||||
}), 0);
|
}), 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user