[READ-ONLY] Mirror of https://github.com/probablykasper/ferrum. Music library app for Mac, Linux and Windows ferrum.kasper.space
electron linux macos music music-library music-player napi windows
0

Configure Feed

Select the types of activity you want to include in your feed.

Focus grid on startup

Kasper (May 28, 2025, 11:34 AM +0200) 76ce7246 297bc1e2

+7 -6
-4
src/App.svelte
··· 173 173 174 174 onDestroy(ipc_listen('Back', navigate_back)) 175 175 onDestroy(ipc_listen('Forward', navigate_forward)) 176 - 177 - onMount(() => { 178 - tracklist_actions.focus() 179 - }) 180 176 </script> 181 177 182 178 <svelte:window on:keydown={keydown} />
+7 -2
src/components/TrackList.svelte
··· 614 614 element: row, 615 615 } 616 616 } 617 + 618 + onMount(() => { 619 + grid.addEventListener('aftergridinit', tracklist_actions.focus) 620 + return () => grid.removeEventListener('aftergridinit', tracklist_actions.focus) 621 + }) 617 622 </script> 618 623 619 624 <Header ··· 629 634 <!-- svelte-ignore a11y_no_static_element_interactions --> 630 635 <revo-grid 631 636 bind:this={grid} 632 - class="grid grow" 637 + class="main-focus-element grid grow" 633 638 {@attach (grid: HTMLRevoGridElement) => { 634 639 grid.setAttribute('theme', 'darkCompact') 635 640 grid.readonly = true ··· 748 753 </div> 749 754 <div 750 755 bind:this={scroll_container} 751 - class="main-focus-element relative h-full overflow-y-auto outline-none" 756 + class="relative h-full overflow-y-auto outline-none" 752 757 tabindex="0" 753 758 > 754 759 </div>