Commit ab3176a
committed
fix(PreviewSignature): remove @load handler to prevent double emit
The @load='onImageLoad' on <img> caused a third 'loaded' emission when
the native DOM load event fired after imageData.value was set, in
addition to the explicit onImageLoad(true) call inside loadImage().
Remove the @load handler and call onImageLoad(true) explicitly in the
data: URL path too, so emission is always triggered once per loadImage
call regardless of jsdom behavior.
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>1 parent dad6bde commit ab3176a
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
| 15 | + | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
| |||
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
59 | | - | |
| 58 | + | |
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
| |||
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
0 commit comments