mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-08 08:52:19 +02:00
Housekeeping
This commit is contained in:
parent
5e10f0eda8
commit
9b6cc40f58
2
assets/scripts/dist/choices.min.js
vendored
2
assets/scripts/dist/choices.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -367,7 +367,7 @@ export default class Choices {
|
|||
* @return {Object} Class instance
|
||||
* @public
|
||||
*/
|
||||
showDropdown(focusInput) {
|
||||
showDropdown(focusInput = false) {
|
||||
const body = document.body;
|
||||
const html = document.documentElement;
|
||||
const winHeight = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
|
||||
|
@ -387,6 +387,7 @@ export default class Choices {
|
|||
this.containerOuter.classList.remove(this.config.classNames.flippedState);
|
||||
}
|
||||
|
||||
// Optionally focus the input if we have a search input
|
||||
if (focusInput && this.canSearch && document.activeElement !== this.input) {
|
||||
this.input.focus();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue