You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that when changing paper sizes (A4 to A5), the window resize event is not fired. But on Chrome, the window.matchMedia("print").addEventListener event is fired whenever the page size changes. (On Firefox I can't find an event that matches a paper size change.)
Describe the issue
When line wrapping is enabled, line numbers are sized to match line heights, and this is updated when the container resizes:
When printing, these recalculations don't happen. For example, printing this reproduction example with A5:
The long line went from wrapping 2 lines to 3 lines, but the line number element is still sized to 2 lines.
If you print on a page size that roughly matches the screen size, you don't see this issue.
Browser and platform
Chrome 122 and Firefox 123
Reproduction link
https://codemirror.net/try/?c=aW1wb3J0IHtiYXNpY1NldHVwLCBFZGl0b3JWaWV3fSBmcm9tICJjb2RlbWlycm9yIgppbXBvcnQge2phdmFzY3JpcHR9IGZyb20gIkBjb2RlbWlycm9yL2xhbmctamF2YXNjcmlwdCIKCmNvbnN0IGRvYyA9IGAKaGVsbG8Kc29tZSB0ZXh0CnRoaXMgaXMgYSBwcmV0dHkgbG9uZyBsaW5lLi4uLi4uLi4uLi4uLgpidXQKdGhlIG5leHQgb25lCmlzIHN1cGVyIGR1cGVyIGxvbmcgYW5kIHdpbGwgYWx3YXlzIHdyYXAgc2xrZGZqIGFsc2RrZmogYWxza2RmaiBhbHNrZGpmIGxha3NqZGYgbGthanMgZGZsa2phIHNkZmxraiBhbHNkamZrIGFzZGYKbGluZSA4CgoKCmxpbmUgMTIKYAoKbmV3IEVkaXRvclZpZXcoewogIGRvYywKICBleHRlbnNpb25zOiBbYmFzaWNTZXR1cCwgamF2YXNjcmlwdCgpLCBFZGl0b3JWaWV3LmxpbmVXcmFwcGluZ10sCiAgcGFyZW50OiBkb2N1bWVudC5ib2R5Cn0pCg==
The text was updated successfully, but these errors were encountered: