mirror of
https://github.com/discourse/discourse.git
synced 2025-03-23 06:05:40 +08:00
FIX: attempts to enforce caret position in filter (#14589)
This commit is contained in:
parent
308823a253
commit
00e8baffa2
@ -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 });
|
||||
|
Loading…
x
Reference in New Issue
Block a user