diff --git a/.changeset/twenty-kangaroos-agree.md b/.changeset/twenty-kangaroos-agree.md new file mode 100644 index 00000000..3190fde1 --- /dev/null +++ b/.changeset/twenty-kangaroos-agree.md @@ -0,0 +1,5 @@ +--- +'@srcbook/web': patch +--- + +fix display bug where tiny empty tooltip would appear when no quickinfo from tsserver diff --git a/packages/web/src/components/cells/hover.tsx b/packages/web/src/components/cells/hover.tsx index 55e6e361..c152aecd 100644 --- a/packages/web/src/components/cells/hover.tsx +++ b/packages/web/src/components/cells/hover.tsx @@ -35,9 +35,10 @@ export function tsHover( end: end, create: () => { const tooltipContainer = document.createElement('div'); - tooltipContainer.className = 'p-2 space-y-2 max-w-3xl max-h-96 overflow-scroll'; + tooltipContainer.className = 'hidden'; function callback({ response }: TsServerQuickInfoResponsePayloadType) { + tooltipContainer.className = 'p-2 space-y-2 max-w-3xl max-h-96 overflow-scroll'; const signatureNode = formatCode(response.displayString, theme); tooltipContainer.appendChild(signatureNode);