Skip to content

Commit de4baea

Browse files
committed
usability improvements
1 parent 4c231a1 commit de4baea

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

previewers/betatest/js/refiqdacore.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ function formatExcerptTooltip(excerpt, startPos, endPos) {
10091009

10101010
return `
10111011
<div style="padding: 8px; font-family: sans-serif;">
1012-
<div style="font-weight: bold; margin-bottom: 6px; font-size: 11px; color: #666; border-bottom: 1px solid #ddd; padding-bottom: 4px;">
1012+
<div style="font-weight: bold; margin-bottom: 6px; font-size: 11px; color: #999; border-bottom: 1px solid #ddd; padding-bottom: 4px;">
10131013
Text Excerpt (Position ${startPos}-${endPos})
10141014
</div>
10151015
<div style="font-size: 13px; line-height: 1.5; max-height: 200px; overflow-y: auto; white-space: pre-wrap; word-wrap: break-word;">
@@ -1037,7 +1037,8 @@ function initializeExcerptTooltips() {
10371037
maxWidth: 450,
10381038
placement: 'top',
10391039
trigger: 'mouseenter focus',
1040-
delay: [200, 0], // 200ms delay on show, 0ms on hide
1040+
delay: [200, 200], // 200ms delay on show/hide
1041+
appendTo: () => document.body, // Append to body to prevent clipping
10411042
onShow(instance) {
10421043
const element = instance.reference;
10431044

@@ -1065,7 +1066,7 @@ function initializeExcerptTooltips() {
10651066
if (element.classList.contains('selection-with-pdf-coords')) {
10661067
const pdfInfo = element.getAttribute('data-tippy-content');
10671068
if (pdfInfo) {
1068-
const pdfHtml = `<div style="padding: 8px 8px 0 8px; font-family: sans-serif; font-size: 11px; color: #666;">${pdfInfo}</div>`;
1069+
const pdfHtml = `<div style="padding: 8px 8px 0 8px; font-family: sans-serif; font-size: 11px; color: #999;">${pdfInfo}</div>`;
10691070
formattedContent = pdfHtml + formattedContent;
10701071
}
10711072
}

0 commit comments

Comments
 (0)