Skip to content

Commit 526280a

Browse files
committed
fix(web): quote popover fades follow size changes
1 parent 4787b4b commit 526280a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎apps/web/src/components/chat/AssistantCitationChip.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,10 @@ function AssistantCitationQuote({ citation }: { citation: AssistantCitation }) {
250250
return (
251251
<div
252252
ref={(element) => {
253-
if (element) updateFade(element);
253+
if (!element) return;
254+
const observer = new ResizeObserver(() => updateFade(element));
255+
observer.observe(element);
256+
return () => observer.disconnect();
254257
}}
255258
onScroll={(event) => updateFade(event.currentTarget)}
256259
className={cn(

0 commit comments

Comments
 (0)