Open xiaoouwang opened 5 years ago
It seems I can reproduce this issue. Here is a published doc: https://beta.rstudioconnect.com/content/15934
If you go on mobile on this doc, it is difficult to select a header in the doc.
Surely related to tocify.js on mobile.
Thanks for the report
Looking at this after some time and I wonder how this should be working for a floating TOC. Mobile space is too small to have something floating and sticky on the side. Having the TOC only at the top make sense and we can't make it sticky while scrolling in this case.
Having another behavior would be like a navbar and have the TOC to be collapsible in a small menu (like hamburger menu in website navbar) that could be sticky while scrolling in that case.
We could also have a "return to the top" floating button at the bottom so that it is easy when scrolling a document on mobile to go back to TOC which is on the top.
Just ideas - I don't really know how much CSS this would require. Maybe bootstrap as some interesting helper. tocify.js is quite old and not really maintained it seems.
By filing an issue to this repo, I promise that
xfun::session_info('rmarkdown')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('rstudio/rmarkdown')
.The toc stops being sticky when the page is viewed in small devices, it's responsive in that it goes on the top however it is no longer sticky.
working example here