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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user