Check if search input should be focussed when opening
This commit is contained in:
parent
cbd2a70dc3
commit
ad21d01693
@ -1915,6 +1915,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
||||
|
||||
this.search.val(this.focusser.val());
|
||||
}
|
||||
if (this.opts.shouldFocusInput(this)) {
|
||||
this.search.focus();
|
||||
// move the cursor to the end after focussing, otherwise it will be at the beginning and
|
||||
// new text will appear *before* focusser.val()
|
||||
@ -1927,6 +1928,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
||||
len = this.search.val().length;
|
||||
el.setSelectionRange(len, len);
|
||||
}
|
||||
}
|
||||
|
||||
// initializes search's value with nextSearchTerm (if defined by user)
|
||||
// ignore nextSearchTerm if the dropdown is opened by the user pressing a letter
|
||||
|
Loading…
Reference in New Issue
Block a user