workaround for chrome focus bug. fixes #939
This commit is contained in:
parent
5a6d1e0947
commit
8520793f25
10
select2.js
10
select2.js
@ -1664,6 +1664,16 @@ the specific language governing permissions and limitations under the Apache Lic
|
|||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
this.search.bind("blur", this.bind(function(e) {
|
||||||
|
// a workaround for chrome to keep the search field focussed when the scroll bar is used to scroll the dropdown.
|
||||||
|
// without this the search field loses focus which is annoying
|
||||||
|
if (document.activeElement === this.body().get(0)) {
|
||||||
|
window.setTimeout(this.bind(function() {
|
||||||
|
this.search.focus();
|
||||||
|
}), 0);
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
this.focusser.bind("keydown", this.bind(function (e) {
|
this.focusser.bind("keydown", this.bind(function (e) {
|
||||||
if (!this.enabled) return;
|
if (!this.enabled) return;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user