Bug 1795536 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Context:
There is this issue in pdf.js:
https://github.com/mozilla/pdf.js/issues/15571
where we use a ResizeObserver and in debugging I noticed that the width of my container was always in px when the height was always in percent.
So I wrote this test case which is pretty similar to what we've in pdf.js and the idea is to always have some dimensions expressed in percent.

STR:
 - open the test case
 - open devtools and inspect the pink div
 - play with the resizer and observe the element width in devtools.

On Windows 11, the width is almost always a percent but from time to time it's a in pixels.
On Mac 12.6, the width is almost always in pixels and from time to time in percents.

I've the feeling that the width I set myself in the callback is at some point overwritten and it shouldn't else it means that we can't reliably set some dimensions in the callback.

:dholbert, could you help here ?
Context:
There is this issue in pdf.js:
https://github.com/mozilla/pdf.js/issues/15571
where we use a ResizeObserver and in debugging I noticed that the width of my container was always in px when the height was always in percent.
So I wrote this test case which is pretty similar to what we've in pdf.js and the idea is to always have some dimensions expressed in percent.

STR:
 - open the test case
 - open devtools and inspect the pink div
 - play with the resizer and observe the element width in devtools.

On Windows 11, the width is almost always a percent but from time to time it's in pixels.
On Mac 12.6, the width is almost always in pixels and from time to time in percents.

I've the feeling that the width I set myself in the callback is at some point overwritten and it shouldn't else it means that we can't reliably set some dimensions in the callback.

:dholbert, could you help here ?

Back to Bug 1795536 Comment 0