FIX: attempts to enforce caret position in filter (#14589)

This commit is contained in:
Joffrey JAFFEUX 2021-10-13 08:19:34 +02:00 committed by GitHub
parent 308823a253
commit 00e8baffa2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -998,6 +998,10 @@ export default Component.extend(
const input = this.getFilterInput();
if (!forceHeader && input) {
input.focus({ preventScroll: true });
if (typeof input.selectionStart === "number") {
input.selectionStart = input.selectionEnd = input.value.length;
}
} else if (!this.selectKit.options.preventHeaderFocus) {
const headerContainer = this.getHeader();
headerContainer && headerContainer.focus({ preventScroll: true });