Mouse scrolling over inline htmlwidget (gt, etc) output

When using RMarkdown notebooks with inline output of code chunks, I often scrolling through long documents with the mouse/trackpad. If I happen to scroll over a section with a rendered gt (or other htmlwidget) output, the focus of the mouse and scrolling is seized by the inline chunk and it's not possible to scroll out of the section until the mouse pointer is refocused outside the rendered output.

I imagine this is a design decision to accommodate widget chunks (iframes) that may need scrolling, but the interruption on scrolling through notebooks drives me a bit batty (:bat:). Has anyone else encountered this problem and perhaps come up with a solution?

Which version of RStudio are you using ? Does it still happen with the last daily version ?


This occurs under both 1.4.993 (Preview) and the most recent (e8eaee106966d0bb9829ea3eea32bb98019) daily of 1.4.999. My testing has been under MacOS with these versions, but this consistently happens in Windows as well (where I run the 1.3 stables).

In both builds, when using the mouse scroll wheel to browse through a document with embedded {gt} chunks, as soon as the mouse pointer hits the same vertical space as the embedded object, scrolling no longer works and focus has to be manually moved to another part of the document for wheel scrolling to work again. Since there is a lot of space padded to even small inline {gt} objects (another gripe for another day), regaining focus requires using the vertical scroll bar, document outline (if present) or keyboard navigation. Super annoying when trying to quickly browse through a document. :wink:

If you have a reproducible example with the daily, I would open a new issue in Rstudio github repo:

For others following this thread, has been created with a reprex and the symptoms. Upvotes to get this looked at and fixed would be super awesome!

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.