fix(canvas): E2E-hardened interaction fixes

- Teleport canvas to body: layout <main> z-10 stacking context let the
  fixed site header (z-40) cover the canvas toolbar
- defer setPointerCapture until the 3px drag threshold: immediate capture
  retargets click/dblclick to the stage, which silently broke note editing
- commitNote no longer early-returns on the editing flag (event-ordering
  could drop typed text); sync node.text back to the non-controlled
  contenteditable on undo/redo restores
- contenteditable only while editing: single click used to focus and allow
  raw typing outside edit mode, swallowing Delete-key handling
This commit is contained in:
dokploy-bot
2026-09-19 22:55:39 +08:00
parent 571ee2c801
commit e83da82f3d
3 changed files with 30 additions and 9 deletions
+8 -3
View File
@@ -551,7 +551,10 @@ const saveLabel = computed(() => ({
</script>
<template>
<div class="cv-page">
<!-- 传送到 body:布局 <main> 自带 relative z-10 层叠上下文,留在里面会被
站点固定顶栏(z-40)盖住,画布工具栏无法点击。 -->
<Teleport to="body">
<div class="cv-page">
<!-- 顶栏 -->
<div class="cv-top">
<div class="cv-top__left">
@@ -675,7 +678,8 @@ const saveLabel = computed(() => ({
</div>
</div>
</div>
</div>
</div>
</Teleport>
</template>
<style scoped>
@@ -719,7 +723,8 @@ const saveLabel = computed(() => ({
.cv-page {
position: fixed;
inset: 0;
z-index: 40;
/* 站点顶栏是 z-40;画布全屏接管时必须盖住它 */
z-index: 50;
display: flex;
flex-direction: column;
background: #0e1015;