Skip to content

Commit

Permalink
fix: CTRL+X will wipe out block content when render errored
Browse files Browse the repository at this point in the history
  • Loading branch information
tiensonqin committed Jul 6, 2022
1 parent c671986 commit 92f2a2b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/frontend/components/block.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -2169,7 +2169,10 @@
(ui/block-error "Block Render Error:"
{:content (:block/content block)
:section-attrs
{:on-click #(state/set-editing! edit-input-id (:block/content block) block "")}})
{:on-click #(do
(editor-handler/clear-selection!)
(editor-handler/unhighlight-blocks!)
(state/set-editing! edit-input-id (:block/content block) block ""))}})
(block-content config block edit-input-id block-id slide?))]
[:div.flex.flex-row.items-center
(when (and (:embed? config)
Expand Down

0 comments on commit 92f2a2b

Please sign in to comment.