[Fix] Fixed broken resizing if clicking Module Store setting item after already being in it

pull/36/head
Oj18 3 years ago
parent d97255b2f0
commit afc5b572c9

@ -22,6 +22,7 @@
- ### Fixes
- Made custom version info in settings more precise and should no longer crash if also using Powercord's BDCompat when opening settings
- Fixed broken resizing if clicking Module Store setting item after already being in it
- Fixed crashes for modules using color picker component in settings without initial value
- Fixed removing a module when it is currently disabled not working

@ -1522,7 +1522,8 @@ export const makeGooseModSettings = () => {
}, 10);
settingsSidebarEl.addEventListener('click', (e) => {
if (e.clientX === 0) return; // <el>.click() - not an actual user click - as it has no mouse position coords (0, 0)
if (e.clientX === 0 // <el>.click() - not an actual user click - as it has no mouse position coords (0, 0)
|| e.target.textContent === 'Module Store') return; // Clicking on Module Store when already in it should not break resizing
document.querySelector('.sidebarRegion-VFTUkN').style.maxWidth = '50%';
document.querySelector('.contentColumnDefault-1VQkGM').style.maxWidth = '740px';

Loading…
Cancel
Save