fix custom search input not being focussed after clicking

This commit is contained in:
Send_Nukez 2021-12-18 17:03:24 +01:00
parent 11eae40857
commit c5fec9cbd1
2 changed files with 4 additions and 1 deletions

View file

@ -1,5 +1,8 @@
Added:
- Ability to hide premium features in addition to ads
Fixed:
- Custom search input not being focussed after clicking
Improved:
- Add `embedWidgetGenerator` modals to custom modal styles. (Things like the [spicetify-marketplace](https://github.com/CharlieS1103/spicetify-marketplace) options)

View file

@ -76,7 +76,7 @@ Dribbblish.on("ready", () => {
input.setAttribute("spellcheck", "false");
input.addEventListener("click", (e) => {
if (!Spicetify.Platform.History.location.pathname.startsWith("/search")) Spicetify.Platform.History.push(`/search/${input.value}`);
waitForElement([`[data-testid="search-input"]`], ([defaultSearch]) => {
waitForElement([`.main-topBar-topbarContent form[role="search"]`], ([defaultSearch]) => {
input.focus();
});
});