Fix panic when painting blocks

This commit is contained in:
Antonio Scandurra 2023-11-15 20:02:35 +01:00
parent c225a3e5af
commit 08dfcba68a

View file

@ -2464,7 +2464,9 @@ impl Element<Editor> for EditorElement {
self.paint_text(text_bounds, &mut layout, editor, cx);
if !layout.blocks.is_empty() {
self.paint_blocks(bounds, &mut layout, editor, cx);
cx.with_element_id(Some("editor_blocks"), |cx| {
self.paint_blocks(bounds, &mut layout, editor, cx);
})
}
});
});