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 cursor position bug on firefox android

I don't fully understand why this bug is there but I think it's an issue
with zustand. Doing it async seems to solve it for now. Should dig in
deeper if it turns up again.

+10 -8
+10 -8
components/TextBlock/index.tsx
··· 224 224 } 225 225 }} 226 226 onFocus={() => { 227 - useUIState.getState().setSelectedBlock(props); 228 - useUIState.setState(() => ({ 229 - focusedBlock: { 230 - type: "block", 231 - entityID: props.entityID, 232 - parent: props.parent, 233 - }, 234 - })); 227 + setTimeout(() => { 228 + useUIState.getState().setSelectedBlock(props); 229 + useUIState.setState(() => ({ 230 + focusedBlock: { 231 + type: "block", 232 + entityID: props.entityID, 233 + parent: props.parent, 234 + }, 235 + })); 236 + }, 5); 235 237 }} 236 238 onSelect={() => { 237 239 useUIState.setState((s) => ({