浏览代码

enhance(ux): clear block selections instantly before closing the block context menu

charlie 1 年之前
父节点
当前提交
cb6f977ed2
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/main/frontend/components/container.cljs

+ 1 - 0
src/main/frontend/components/container.cljs

@@ -839,6 +839,7 @@
                         (fn [{:keys [id]}]
                           [:div {:on-click #(shui/popup-hide! id)} content])
                         {:content-props {:class "w-[280px] ls-context-menu-content"}
+                         :root-props {:onOpenChange #(when-not % (state/clear-selection!))}
                          :as-dropdown? true}))
 
                     handled