This commit is contained in:
Timothy Jaeryang Baek committed 2026-10-16 14:55:40 +04:00
1 parent 362b01d0b2
commit d12da61e5a
3 files changed
+47 -7

No files matched your search

+2 -3
View File
@@ -22,7 +22,8 @@ export function highlightRange(
top: `${(rect.top - bounds.top) / scale}px`,
width: `${rect.width / scale}px`,
height: `${rect.height / scale}px`,
pointerEvents: 'auto',
// Let the text underneath receive native selection gestures.
pointerEvents: 'none',
padding: '0',
margin: '0',
border: '0',
@@ -31,8 +32,6 @@ export function highlightRange(
background: 'rgba(250,204,21,.20)',
cursor: 'help'
});
target.onmouseenter = () => (target.style.background = 'rgba(250,204,21,.36)');
target.onmouseleave = () => (target.style.background = 'rgba(250,204,21,.20)');
layer.appendChild(target);
}
return rects.length > 0;