Skip to content

Commit

Permalink
fix(trace-viewer): Fix network log flicker #33929 (#34036)
Browse files Browse the repository at this point in the history
  • Loading branch information
agg23 authored Dec 17, 2024
1 parent 7ce1a54 commit aabbcbf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/web/src/uiUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ export function useMeasure<T extends Element>() {
const target = ref.current;
if (!target)
return;

const bounds = target.getBoundingClientRect();

setMeasure(new DOMRect(0, 0, bounds.width, bounds.height));

const resizeObserver = new ResizeObserver((entries: any) => {
const entry = entries[entries.length - 1];
if (entry && entry.contentRect)
Expand Down

0 comments on commit aabbcbf

Please sign in to comment.