File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -269,6 +269,14 @@ export default class UI extends Module<UINodes> {
269
269
this . isMobile = window . innerWidth < 650 ;
270
270
}
271
271
272
+ /**
273
+ * Updates --vh variable value, which allows to calculate actual 100vh value for mobile browsers
274
+ */
275
+ private setAppHeightFraction ( ) : void {
276
+ const doc = document . documentElement
277
+ doc . style . setProperty ( '--vh' , ( window . innerHeight * 0.01 ) + 'px' ) ;
278
+ }
279
+
272
280
/**
273
281
* Makes Editor.js interface
274
282
*/
@@ -437,6 +445,11 @@ export default class UI extends Module<UINodes> {
437
445
* Detect mobile version
438
446
*/
439
447
this . checkIsMobile ( ) ;
448
+
449
+ /**
450
+ * Updates stored window height fraction
451
+ */
452
+ this . setAppHeightFraction ( ) ;
440
453
}
441
454
442
455
/**
Original file line number Diff line number Diff line change 129
129
}
130
130
131
131
.ce-scroll-locked , .ce-scroll-locked > body {
132
- height : 100vh ;
132
+ height : 100vh ; /* Fallback for browsers that do not support Custom Properties */
133
+ height : calc (var (--vh ) * 100 );
133
134
overflow : hidden;
134
135
/**
135
136
* Mobile Safari fix
You can’t perform that action at this time.
0 commit comments