CookieMonsterTeam / CookieMonsterFramework

A collection of functions for the Cookie Monster Mod Family
MIT License
1 stars 5 forks source link

Settings get's duplicated on any setting's input #2

Open Frustrated-Programmer opened 2 years ago

Frustrated-Programmer commented 2 years ago

Describe the bug CookieMonsterFramework duplicates it's settings whenever a setting is changed, this effects other Mod's settings being displayed.

To Reproduce

  1. Load in any mod that uses CookieMonsterFramework, the particular mod I use is Cookie Monster.
  2. Go into settings, minimize the Cookie Monster Mod Family folder (not required to reproduce, but makes it easier to see the issue)
  3. Change any setting, for example Custom Grandmas or Alt Font. It doesn't matter which setting since all settings cause the issue.

Screenshots https://imgur.com/a/jXX34Kt

Save file Unimportant, can be reproduced on brand new saves or even old saves that's been going on for a while.

Browsers Reproducible for me on my following browsers: Chrome 93 (Brave) Chrome 83 (Google Chrome) Edge 94 Firefox 92

Proposal to fix I haven't tested this, but as a coder, this seems like a possible solution to fix the problem. CookieMonsterFramework/src/frameworkDataObject/menuSections/options/createFrameworkOptionsMenuSection.js add the following on the first line of the createFrameworkOptionsMenuSection function:

if(l('cookieMonsterFrameworkMenuSection')) l('cookieMonsterFrameworkMenuSection').remove();
Frustrated-Programmer commented 2 years ago

Further looking into, reveals this is known, and while it's Cookie Clicker's fault for not adding proper settings support, Cookie Monster can at least remove this particular bug of it duplicating even if the scrolling issue that happens on other browsers will still exist.

DanielNoord commented 2 years ago

Your comment might made reconsider my earlier position and I have pushed a hot fix that (I think) should solve these issues.

I'm keeping this issue open as a remind that this is a temporary fix and I do want to do make this work without code injection. Hopefully Orteil will begin offering more support to mods in the near future!