File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
inst/rmarkdown/templates/flex_dashboard/resources Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,18 @@ var FlexDashboard = (function () {
149
149
window . location . reload ( ) ;
150
150
}
151
151
} ) ;
152
+ } else {
153
+ // if in desktop mode and resizing to mobile, make sure the heights are 100%
154
+ // This enforces what `fillpage.css` does for "wider" pages.
155
+ // Since we are not reloading once the page becomes small, we need to force the height to 100%
156
+ // This is a new situation introduced when `_options.resize_reload` is `false`
157
+ if ( ! _options . isMobile ) {
158
+ // only add if `fillpage.css` was added in the first place
159
+ if ( _options . fillPage ) {
160
+ // fillpage.css
161
+ $ ( "html,body,#dashboard" ) . css ( "height" , "100%" ) ;
162
+ }
163
+ }
152
164
}
153
165
// trigger layoutcomplete event
154
166
dashboardContainer . trigger ( 'flexdashboard:layoutcomplete' ) ;
@@ -404,7 +416,7 @@ var FlexDashboard = (function () {
404
416
var h3 = $ ( '<h3></h3>' ) ;
405
417
h3 . append ( h2 . contents ( ) ) ;
406
418
h3 . insertBefore ( h2 ) ;
407
- h2 . detatch ( ) ;
419
+ h2 . detach ( ) ;
408
420
409
421
// wipeout h2 elements then enclose them in a single h2
410
422
var level2 = page . find ( 'div.section.level2' ) ;
You can’t perform that action at this time.
0 commit comments