mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Broken quick search on iPadOS (#14663)
This also reverts back to selecting the search input text when reopening the search panel.
This commit is contained in:
parent
c2d4638ee1
commit
3e86ec3e4e
@ -7,7 +7,6 @@ import { createWidget } from "discourse/widgets/widget";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
import { h } from "virtual-dom";
|
||||
import { iconNode } from "discourse-common/lib/icon-library";
|
||||
import putCursorAtEnd from "discourse/lib/put-cursor-at-end";
|
||||
import { schedule } from "@ember/runloop";
|
||||
import { scrollTop } from "discourse/mixins/scroll-top";
|
||||
import { wantsNewWindow } from "discourse/lib/intercept-click";
|
||||
@ -626,7 +625,9 @@ export default createWidget("header", {
|
||||
focusSearchInput() {
|
||||
if (this.state.searchVisible) {
|
||||
schedule("afterRender", () => {
|
||||
putCursorAtEnd(document.querySelector("#search-term"));
|
||||
const searchInput = document.querySelector("#search-term");
|
||||
searchInput.focus();
|
||||
searchInput.select();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user