Commit 797ebd1
authored
fix: Wait for the correct clientWidth/clientHeight when showing Feedback Screenshot previews (#16648)
Before we would see a blank screenshot in the feedback modal when using
firefox. After resizing the screenshot would appear.
I debugged and foundout that the clientWidth/clientHeight wasn't being
set right away, therefore the elements were on the page properly, and
contained the correct pixel information drawn into the canvas, but the
canvas wasn't sized correctly on the page, so you couldn't see anything.
This triggers a resize after a tick, giving the browser a chance first
set the width/height before we measure it and set the scale factor.
**Before:**
<img width="1282" alt="SCR-20250618-kgwr"
src="https://github.com/user-attachments/assets/c95f82f1-8468-4640-86ec-ca30874ce841"
/>
After:
<img width="1282" alt="SCR-20250618-kgrm"
src="https://github.com/user-attachments/assets/e79e62df-ed53-4933-b42c-abd2ce520dd1"
/>
Fixes REPLAY-4201 parent 4bbe610 commit 797ebd1
File tree
1 file changed
+5
-0
lines changed- packages/feedback/src/screenshot/components
1 file changed
+5
-0
lines changedLines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
169 | 174 | | |
170 | 175 | | |
171 | 176 | | |
| |||
0 commit comments