mirror of
https://github.com/chinchang/web-maker.git
synced 2025-05-06 10:35:30 +02:00
adjust body height when window resizes/zooms
This commit is contained in:
parent
80e817ec9f
commit
8d86d6c49e
@ -434,7 +434,12 @@ export default class App extends Component {
|
||||
}
|
||||
}
|
||||
componentDidMount() {
|
||||
document.body.style.height = `${window.innerHeight}px`;
|
||||
function setBodySize() {
|
||||
document.body.style.height = `${window.innerHeight}px`;
|
||||
}
|
||||
window.addEventListener('resize', () => {
|
||||
setBodySize();
|
||||
});
|
||||
|
||||
// Editor keyboard shortucuts
|
||||
window.addEventListener('keydown', event => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user