fix(study): user-select / long-press 메뉴 차단
증상 (사용자 사진 8856): 펜으로 쓰는데 "복사하기 / Google 으로 검색" 같은 iOS 텍스트 선택 메뉴가 뜸. Safari 가 펜 입력을 텍스트 선택으로 해석. Fix: - 캔버스 + 컨테이너 + 페이지 root 에 user-select / -webkit-user-select / -webkit-touch-callout / -webkit-tap-highlight-color 적용 - canvas 에 oncontextmenu preventDefault — long-press 후 메뉴 차단
This commit is contained in:
@@ -500,8 +500,12 @@
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- 캔버스 컨테이너 — 명확한 border 로 영역 구분 -->
|
||||
<div bind:this={containerEl} class="flex-1 min-h-0 bg-bg relative overflow-hidden border-2 border-default/30">
|
||||
<!-- 캔버스 컨테이너 — 텍스트 선택 / iOS long-press 메뉴 차단 -->
|
||||
<div
|
||||
bind:this={containerEl}
|
||||
class="flex-1 min-h-0 bg-bg relative overflow-hidden border-2 border-default/30"
|
||||
style="user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;"
|
||||
>
|
||||
<canvas
|
||||
bind:this={canvas}
|
||||
onpointerdown={onPointerDown}
|
||||
@@ -509,9 +513,9 @@
|
||||
onpointerup={endStroke}
|
||||
onpointercancel={endStroke}
|
||||
onpointerleave={(e) => { if (inflight && e.pointerId === activePointerId) endStroke(e); }}
|
||||
oncontextmenu={(e) => e.preventDefault()}
|
||||
class="block"
|
||||
style="touch-action: none; cursor: {tool === 'eraser' ? 'cell' : 'crosshair'};"
|
||||
style="touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; cursor: {tool === 'eraser' ? 'cell' : 'crosshair'};"
|
||||
></canvas>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, viewport-fit=cover" />
|
||||
</svelte:head>
|
||||
|
||||
<div class="h-full flex flex-col relative" style="touch-action: manipulation;">
|
||||
<div class="h-full flex flex-col relative" style="touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;">
|
||||
<!-- 상단 헤더 -->
|
||||
<div class="flex items-center justify-between gap-2 px-3 py-2 border-b border-default bg-surface shrink-0 z-10">
|
||||
<Button href="/study/write" size="sm" variant="ghost" icon={ArrowLeft}>목록</Button>
|
||||
|
||||
Reference in New Issue
Block a user