Add (at this point faulty) text selection

This commit is contained in:
2026-04-03 23:56:51 +02:00
parent 0d0e9fe043
commit 96ba5d35c7
7 changed files with 214 additions and 682 deletions

View File

@@ -102,6 +102,34 @@
.page-wrapper canvas {
display: block;
}
/* Invisible text overlay for native selection. Spans are positioned via
CSS matrix() derived from PDF text transforms; color:transparent keeps
the canvas visible while the browser handles selection normally. */
.textLayer {
position: absolute;
inset: 0;
overflow: hidden;
z-index: 2;
line-height: 1;
text-size-adjust: none;
forced-color-adjust: none;
}
.textLayer span {
color: transparent;
position: absolute;
white-space: pre;
cursor: text;
transform-origin: 0% 0%;
font-size: 1px;
user-select: text;
-webkit-user-select: text;
}
.textLayer ::selection {
background: rgba(100, 160, 255, 0.35);
}
</style>
</head>
<body>