tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
289
fork
atom
a tool for shared writing and social publishing
289
fork
atom
overview
issues
27
pulls
pipelines
small adjustment for better scrolling on page focus
cozylittle.house
1 month ago
10f4e467
24b0ad84
+5
-1
1 changed file
expand all
collapse all
unified
split
components
Blocks
Block.tsx
+5
-1
components/Blocks/Block.tsx
···
32
32
import { HorizontalRule } from "./HorizontalRule";
33
33
import { deepEquals } from "src/utils/deepEquals";
34
34
import { isTextBlock } from "src/utils/isTextBlock";
35
35
+
import { focusPage } from "src/utils/focusPage";
35
36
36
37
export type Block = {
37
38
factID: string;
···
62
63
// Block handles all block level events like
63
64
// mouse events, keyboard events and longPress, and setting AreYouSure state
64
65
// and shared styling like padding and flex for list layouting
65
65
-
66
66
+
let { rep } = useReplicache();
66
67
let mouseHandlers = useBlockMouseHandlers(props);
67
68
let handleDrop = useHandleDrop({
68
69
parent: props.parent,
···
87
88
88
89
let [areYouSure, setAreYouSure] = useState(false);
89
90
useEffect(() => {
91
91
+
if (selected && rep) {
92
92
+
focusPage(props.parent, rep);
93
93
+
}
90
94
if (!selected) {
91
95
setAreYouSure(false);
92
96
}