summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/renderer/src/App.css1
-rw-r--r--src/renderer/src/components/PdfViewer.tsx4
2 files changed, 4 insertions, 1 deletions
diff --git a/src/renderer/src/App.css b/src/renderer/src/App.css
index 4c3f731..d4c5d1f 100644
--- a/src/renderer/src/App.css
+++ b/src/renderer/src/App.css
@@ -1337,6 +1337,7 @@ html, body, #root {
align-items: center;
gap: 8px;
background: #EDE5CE;
+ user-select: none;
}
.pdf-page {
diff --git a/src/renderer/src/components/PdfViewer.tsx b/src/renderer/src/components/PdfViewer.tsx
index 01896d7..c66df98 100644
--- a/src/renderer/src/components/PdfViewer.tsx
+++ b/src/renderer/src/components/PdfViewer.tsx
@@ -214,9 +214,11 @@ export default function PdfViewer() {
// SyncTeX: double-click PDF → jump to source
const handlePdfDoubleClick = useCallback(async (e: MouseEvent) => {
+ e.preventDefault()
+ e.stopPropagation()
if (!pdfPath) { console.log('[synctex-ui] no pdfPath'); return }
const canvas = (e.target as HTMLElement).closest('canvas.pdf-page') as HTMLCanvasElement | null
- if (!canvas) { console.log('[synctex-ui] no canvas target'); return }
+ if (!canvas) { console.log('[synctex-ui] no canvas target, target was:', (e.target as HTMLElement).tagName, (e.target as HTMLElement).className); return }
const container = containerRef.current
if (!container) return