@@ -236,7 +236,7 @@ const Settings = () => {
236
236
if ( latestVersion === app . system . version )
237
237
openModal ( "No Updates available." , "Check back again later :)" , null , null )
238
238
else {
239
- openModal ( "New update available!" , `Current: ${ app . system . version } \n\n Latest: ${ latestVersion } ` , "UPDATE NOW" , ( ) => systemTask ( 'update' ) )
239
+ openModal ( "New update available!" , `Current: ${ app . system . version } \n\n Latest: ${ latestVersion } ` , "UPDATE NOW" , ( ) => systemTask ( 'update' ) )
240
240
}
241
241
} catch ( error ) {
242
242
openModal ( "Error checking for updates:" , error , null , null )
@@ -318,7 +318,7 @@ const Settings = () => {
318
318
) )
319
319
//console.log(content.options, dataOptions)
320
320
//console.log(dropdown)
321
-
321
+
322
322
// Check for boolean setting
323
323
const isBoolean = typeof value === 'boolean' ; // Checks if the setting is a boolean.
324
324
const isBinding = key . includes ( 'bindings' ) // Checks if the setting handles bindings
@@ -415,6 +415,30 @@ const Settings = () => {
415
415
}
416
416
417
417
418
+ //Fixing Mouse Wheel Scrolling for IndianaScroll.
419
+ const scrollRef = useRef ( null ) ;
420
+
421
+ // Make sure wheel event is always attached after every render.
422
+ useEffect ( ( ) => {
423
+ const handleWheel = ( event ) => {
424
+ if ( scrollRef . current ) {
425
+ scrollRef . current . scrollTop += event . deltaY ; // Scrolls vertically
426
+ }
427
+ } ;
428
+
429
+ const container = scrollRef . current ;
430
+ if ( container ) {
431
+ container . addEventListener ( "wheel" , handleWheel ) ;
432
+ }
433
+
434
+ return ( ) => {
435
+ if ( container ) {
436
+ container . removeEventListener ( "wheel" , handleWheel ) ;
437
+ }
438
+ } ;
439
+ } , [ system . settingPage ] ) ; // Make sure useEffect runs again on reset
440
+
441
+
418
442
return (
419
443
< Container >
420
444
< ScrollContainer
@@ -423,7 +447,8 @@ const Settings = () => {
423
447
horizontal = { false }
424
448
hideScrollbars = { true }
425
449
ignoreElements = 'input, select'
426
- key = { JSON . stringify ( reset ) }
450
+ key = { `${ system . settingPage } -${ reset } ` } // This will force a complete re-render when page changes
451
+ innerRef = { scrollRef }
427
452
>
428
453
{ system . settingPage === 1 &&
429
454
< >
0 commit comments