rstudio / rstudio/flexdashboard
vertical_layout: scroll and page refreshes
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 848
- Forks
- 298
- PR merge metrics
- No merged PRs in 30d
Description
I'm experiencing an odd behavior when using vertical_layout: scroll with paged content. After a navbar button for a page has been clicked (even if there is only one page, a button must be clicked), and the document is refreshed in the browser, the page will automatically scroll up slightly, hiding the top of the content under the navbar. This doesn't happen on the initial document load... only after the "button clicked, document reload" sequence. Also, it only happens if the content of the page is longer than the screen.
I have observed this both in Chrome and Firefox on Linux.
Here is a MWE which exhibits this behavior:
---
title: Minimal Working Example
output:
flexdashboard::flex_dashboard:
self_contained: true
vertical_layout: scroll
---
```{r setup, include=F}
library(kableExtra)
```
Foo
=======================================================================
### Cars
```{r, echo=F}
kable( mtcars, "html", escape=F) %>%
kable_styling(bootstrap_options=c("hover","condensed","striped"))
```
Edit:
Here are two screenshots: the first directly after opening the page, and the second immediately after clicking the navbar button and refreshing the page in the browser.


Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the supplied MWE with flexdashboard's vertical_layout: scroll in Chrome or Firefox. Compare the initial load with the navbar-click-then-refresh sequence for content longer than the screen; done means refreshing no longer scrolls the page up beneath the navbar.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, r
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100