a tool for shared writing and social publishing
0
fork

Configure Feed

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

fix keeping foucs in clicking on toolbar

+2 -4
+1 -2
components/DesktopFooter.tsx
··· 2 2 import { useUIState } from "src/useUIState"; 3 3 import { Media } from "./Media"; 4 4 import { TextToolbar } from "./Toolbar"; 5 - import { keepFocus } from "./Toolbar/TextBlockTypeButtons"; 6 5 7 6 export function DesktopCardFooter(props: { cardID: string }) { 8 7 let focusedBlock = useUIState((s) => s.focusedBlock); ··· 21 20 <div 22 21 className="pointer-events-auto w-fit mx-auto py-1 px-3 bg-bg-card border border-border rounded-full shadow-sm" 23 22 onMouseDown={(e) => { 24 - keepFocus(focusedBlock.entityID); 23 + if (e.currentTarget === e.target) e.preventDefault(); 25 24 }} 26 25 > 27 26 <TextToolbar
+1 -2
components/MobileFooter.tsx
··· 5 5 import { TextToolbar } from "components/Toolbar"; 6 6 import { ShareOptions } from "./ShareOptions"; 7 7 import { HomeButton } from "./HomeButton"; 8 - import { keepFocus } from "./Toolbar/TextBlockTypeButtons"; 9 8 10 9 export function MobileFooter(props: { entityID: string }) { 11 10 let focusedBlock = useUIState((s) => s.focusedBlock); ··· 16 15 <div 17 16 className="w-full z-10 p-2 flex bg-bg-card " 18 17 onMouseDown={(e) => { 19 - keepFocus(focusedBlock.entityID); 18 + if (e.currentTarget === e.target) e.preventDefault(); 20 19 }} 21 20 > 22 21 <TextToolbar