Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/editor/blocks/step.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,11 @@ function TestStepContent({
const viewTransitionRef = useRef(false);

useEffect(() => {
const el = containerRef.current?.parentElement;
// Measure the block's node-view box (the step's real available width). The
// immediate parent is a `display: contents` anchor with no box, so its width
// reads as 0 and would wrongly force the vertical layout — in horizontal view
// that spurious flip remounts the editor and collapses the step on open.
const el = containerRef.current?.closest(".bn-block-content");
if (!el) return;
const observer = new ResizeObserver((entries) => {
for (const entry of entries) {
Expand Down
Loading