Comments (3)
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.)
from dev.
I added this to the MWE to make cm aware of the matchMedia
event:
window.matchMedia("print").addEventListener("change", (x) => {
window.dispatchEvent(new CustomEvent("beforeprint"))
})
and it fixes the issue! (on Chrome) So maybe we could bind the onPrint
handler to matchMedia("print")
?
from dev.
Attached patch uses media queries in a way that should help with this.
from dev.
Related Issues (20)
- Access `view` in `renderMessage` HOT 2
- Unified merge view - improve what text is in cm-deletedText HOT 6
- Typescript generic breaks highlighting HOT 1
- bug: [Golang] Incorrect import declaration by auto completion HOT 1
- Linter example no longer works on Ubuntu 24.04? HOT 2
- Gboard doesn't delete text in Firefox HOT 7
- forceLinting() doesn't cancel pending linting HOT 5
- MergeView: crashes browser tab for large files HOT 2
- Built in browser search does not work for large documents HOT 3
- Scroll position shifts on click into the middle of a large document HOT 2
- Selection breaks if you drag outside of an iframe HOT 1
- Content not properly rendered when line contains many block widgets HOT 1
- CODE
- Xxx
- Codemirror/view 6.28.0 breaks newlines in chrome 126 HOT 8
- Selecting backwards throws errors with EditContext (6.28.0). HOT 4
- Setting `EditorView.editable.of(false)` does not work with EditContext API HOT 2
- After setting the error diagnostics by using setDiagnostics, when copying & pasting the complete text, the entire document prompts error. HOT 2
- placeholder with HTMLElement, when shared between multiple views, is only visible on one view
- codemirror/view 6.28.2 version will cause abnormal input of Chinese input method HOT 21
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dev.