diff --git a/src/equicordplugins/questify/index.tsx b/src/equicordplugins/questify/index.tsx index ba25393b2..9a1f9c544 100644 --- a/src/equicordplugins/questify/index.tsx +++ b/src/equicordplugins/questify/index.tsx @@ -1388,8 +1388,8 @@ export default definePlugin({ }, { // Prevent SearchableSelect from force-scrolling into view, causing the dropdown to close. - match: /(?<=\.scrollIntoView\()/, - replace: "{block:\"nearest\",inline:\"nearest\"}" + match: /(&&\i.current\?\.scrollIntoView\(\))/, + replace: "" }, { // Passes a popoutClassName and optionClassName to the popout handler. @@ -1419,6 +1419,14 @@ export default definePlugin({ } ] }, + { + // Prevent the new version of SearchableSelect from force-scrolling into view. + find: '"data-mana-component":"combobox",', + replacement: { + match: /\i.current\?\.scrollIntoView\({.{0,50}?}\)/, + replace: "" + } + }, { // Formats the Orbs balance on the Quests page with locale string formatting. find: '("BalanceCounter")', diff --git a/src/equicordplugins/questify/utils/misc.tsx b/src/equicordplugins/questify/utils/misc.tsx index df2e3bec5..3434629e0 100644 --- a/src/equicordplugins/questify/utils/misc.tsx +++ b/src/equicordplugins/questify/utils/misc.tsx @@ -77,7 +77,7 @@ export function getQuestProgress(quest: Quest, task: QuestTask) { export function getQuestTarget(task: QuestTask) { const isWatch = task.type === QuestTaskType.WATCH_VIDEO || task.type === QuestTaskType.WATCH_VIDEO_ON_MOBILE; const raw = task.target; - const adjusted = raw - (isWatch ? videoQuestLeeway : 0); + const adjusted = Math.max(0, raw - (isWatch ? videoQuestLeeway : 0)); return { raw, adjusted }; }